mirror of
https://github.com/rtlsdrblog/rtl-sdr-blog.git
synced 2024-11-10 04:37:37 +01:00
lib: fix memory leak in rtlsdr_open()
Thanks to Vincent Perrier for reporting the bug.
This commit is contained in:
parent
7f2ae12548
commit
be1d1206bf
@ -1628,6 +1628,9 @@ found:
|
|||||||
return 0;
|
return 0;
|
||||||
err:
|
err:
|
||||||
if (dev) {
|
if (dev) {
|
||||||
|
if (dev->devh)
|
||||||
|
libusb_close(dev->devh);
|
||||||
|
|
||||||
if (dev->ctx)
|
if (dev->ctx)
|
||||||
libusb_exit(dev->ctx);
|
libusb_exit(dev->ctx);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user