diff options
-rw-r--r-- | src/operations.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/operations.c b/src/operations.c index 88a7a59..2c28228 100644 --- a/src/operations.c +++ b/src/operations.c @@ -80,7 +80,8 @@ struct device_info * dev_detect(void) { } clean: - usb_close_device(usb); + if (usb) + usb_close_device(usb); free(dev); return NULL; |