mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-16 00:34:39 +08:00
monitor: Fix memory leaks
While performing static tool analysis using coverity found following reports for resouse leak bluez-5.64/monitor/jlink.c:111: leaked_storage: Variable "so" going out of scope leaks the storage it points to. bluez-5.64/monitor/jlink.c:113: leaked_storage: Variable "so" going out of scope leaks the storage it points to.
This commit is contained in:
parent
5eb96b3ec8
commit
6f02010ce0
@ -107,9 +107,12 @@ int jlink_init(void)
|
||||
!jlink.tif_select || !jlink.setspeed ||
|
||||
!jlink.connect || !jlink.getsn ||
|
||||
!jlink.emu_getproductname ||
|
||||
!jlink.rtterminal_control || !jlink.rtterminal_read)
|
||||
!jlink.rtterminal_control || !jlink.rtterminal_read) {
|
||||
dlclose(so);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
dlclose(so);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user