mirror of
https://github.com/rtlsdrblog/rtl-sdr-blog.git
synced 2025-07-10 03:15:10 +02:00
lib: fix memory leak in rtlsdr_open()
Thanks to Vincent Perrier for reporting the bug.
This commit is contained in:
@ -1628,6 +1628,9 @@ found:
|
||||
return 0;
|
||||
err:
|
||||
if (dev) {
|
||||
if (dev->devh)
|
||||
libusb_close(dev->devh);
|
||||
|
||||
if (dev->ctx)
|
||||
libusb_exit(dev->ctx);
|
||||
|
||||
|
Reference in New Issue
Block a user