lib: fix memory leak in rtlsdr_open()

Thanks to Vincent Perrier for reporting the bug.
master
Steve Markgraf 3 years ago
parent 7f2ae12548
commit be1d1206bf
  1. 3
      src/librtlsdr.c

@ -1628,6 +1628,9 @@ found:
return 0;
err:
if (dev) {
if (dev->devh)
libusb_close(dev->devh);
if (dev->ctx)
libusb_exit(dev->ctx);

Loading…
Cancel
Save