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
This commit is contained in:
Harald Welte 2022-01-25 16:23:45 +01:00
parent 1d1ab74fdf
commit fca15ebf99
1 changed files with 1 additions and 1 deletions

View File

@ -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);