mirror of https://gerrit.osmocom.org/libosmocore
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: I2b7ab8dddd69453826053663dd5589a941c2e47dchanges/72/26972/1
parent
1d1ab74fdf
commit
fca15ebf99
|
@ -99,7 +99,7 @@ static void osmo_usb_added_cb(int fd, short events, void *user_data)
|
|||
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);
|
||||
|
|
Loading…
Reference in New Issue