laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/26972 )

Change subject: osmo_libusb: Fix NULL check in osmo_usb_removed_cb()
......................................................................

osmo_libusb: Fix NULL check in osmo_usb_removed_cb()

Thread 1 "simtrace2-tool" received signal SIGSEGV, Segmentation fault.
0x00007ffff73dd2a0 in llist_del (entry=0x0) at 
../include/osmocom/core/linuxlist.h:130
130             __llist_del(entry->prev, entry->next);
(gdb) bt

Change-Id: I2b7ab8dddd69453826053663dd5589a941c2e47d
---
M src/usb/osmo_libusb.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/src/usb/osmo_libusb.c b/src/usb/osmo_libusb.c
index 05331a1..a6f194a 100644
--- a/src/usb/osmo_libusb.c
+++ b/src/usb/osmo_libusb.c
@@ -99,7 +99,7 @@
 static void osmo_usb_removed_cb(int fd, void *user_data)
 {
        struct osmo_fd *ofd = osmo_fd_get_by_fd(fd);
-       if (!fd)
+       if (!ofd)
                return;
        osmo_fd_unregister(ofd);
        talloc_free(ofd);

--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/26972
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I2b7ab8dddd69453826053663dd5589a941c2e47d
Gerrit-Change-Number: 26972
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-MessageType: merged

Reply via email to