SHA256
1
0
forked from pool/rtl-sdr
rtl-sdr/rtl-sdr-0002-fix-rtlsdr_open-memory-leak.patch
Martin Hauke 1ea97b31dd Accepting request 907681 from home:wkazubski:test:science
- patches:
    rtl-sdr-0003-disable-zerocopy-by-default.patch
    rtl-sdr-0007-allow-build-rtlsdr-as-subroject.patch
    rtl-sdr-0008-add-CMP0075-policy.patch
    rtl-sdr-0016-add-missing-rtlsdrConfig.patch
    rtl-sdr-0017-add-rtl_biast-as-install-target.patch
    rtl-sdr-0018-fix-for-older-cmake.patch
  merged into rtl-sdr-0015-modernize-cmake-usage.patch
- patch rtl-sdr-0005-add-rtlsdr_set_bias_tee_gpio.patch
  merged into rtl-sdr-0006-add-rtl_biast.patch
- Added patches to upgrade to latest git head (only significant
  changes), including:
    + rtl-sdr-0001-mmap-bug-arm.patch
    + rtl-sdr-0002-fix-rtlsdr_open-memory-leak.patch
    + rtl-sdr-0003-disable-zerocopy-by-default.patch
    + rtl-sdr-0004-fix-rtl_eeprom-warnings.patch
    + rtl-sdr-0005-add-rtlsdr_set_bias_tee_gpio.patch
    + rtl-sdr-0006-add-rtl_biast.patch
    + rtl-sdr-0007-allow-build-rtlsdr-as-subroject.patch
    + rtl-sdr-0008-add-CMP0075-policy.patch
    + rtl-sdr-0009-fix-FC0013-UHF-reception.patch
    + rtl-sdr-0010-improve-librtlsdr_pc.patch
    + rtl-sdr-0011-improve-rtl_power--scanning-range-parsing.patch
    + rtl-sdr-0012-use-udev-uaccess_rules.patch (not used)
    + rtl-sdr-0013-add-IPV6-for-rtl_tcp.patch
    + rtl-sdr-0014-initialize-listensocket_in-rtl_tcp.patch
    + rtl-sdr-0015-modernize-cmake-usage.patch
    + rtl-sdr-0016-add-missing-rtlsdrConfig.patch
    + rtl-sdr-0017-add-rtl_biast-as-install-target.patch
    + rtl-sdr-0018-fix-for-older-cmake.patch
    + rtl-sdr-0019-fix-short-write-in-r82xx_read.patch
    + rtl-sdr-0020-populate-pkgconfig-with-prefix.patch
  * Full bias tee support for RTL-SDR v3 dongle
  * Command line utility rtl_biast for controlling bias tee
  * IPV-6 support for rtl_tcp
  * Fixed some bugs and compile time issues

OBS-URL: https://build.opensuse.org/request/show/907681
OBS-URL: https://build.opensuse.org/package/show/hardware:sdr/rtl-sdr?expand=0&rev=21
2021-07-31 09:22:31 +00:00

25 lines
642 B
Diff

From be1d1206bfb6e6c41f7d91b20b77e20f929fa6a7 Mon Sep 17 00:00:00 2001
From: Steve Markgraf <steve@steve-m.de>
Date: Tue, 16 Jul 2019 23:31:31 +0200
Subject: [PATCH] lib: fix memory leak in rtlsdr_open()
Thanks to Vincent Perrier for reporting the bug.
---
src/librtlsdr.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/librtlsdr.c b/src/librtlsdr.c
index 89ec903..d72a0f5 100644
--- a/src/librtlsdr.c
+++ b/src/librtlsdr.c
@@ -1628,6 +1628,9 @@ int rtlsdr_open(rtlsdr_dev_t **out_dev, uint32_t index)
return 0;
err:
if (dev) {
+ if (dev->devh)
+ libusb_close(dev->devh);
+
if (dev->ctx)
libusb_exit(dev->ctx);