Skip to content

Commit

Permalink
usb: Fix goto to wrong label
Browse files Browse the repository at this point in the history
The jump to the cleanup epilog pointed to the wrong label, which caused
the libusb context to never be freed on error.

Signed-off-by: Paul Cercueil <[email protected]>
  • Loading branch information
pcercuei committed Jul 26, 2021
1 parent 7b64435 commit e2dca24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ static struct iio_context * usb_create_context(unsigned int bus,
if (ret < 0) {
ret = -(int) libusb_to_errno(ret);
IIO_ERROR("Unable to get usb device list: %i\n", ret);
goto err_destroy_iiod_client;
goto err_libusb_exit;
}

usb_dev = NULL;
Expand Down

0 comments on commit e2dca24

Please sign in to comment.