diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2021-01-25 15:16:29 +0100 |
---|---|---|
committer | Andreas Eversberg <jolly@eversberg.eu> | 2021-03-07 10:38:38 +0100 |
commit | 8c0a25f3b0f5ab264333c25ca30145e5f49dcb4f (patch) | |
tree | dc9f983c6c30f6ce8b2df218fb610a18da00857d /src/libsdr/soapy.c | |
parent | 22cb70fb1b2c628383c122aafcfdccd3070f269a (diff) |
Added special strdup to liboptions, to prevent memory leaks for option strings
If you are doing memory leak debugging you don't want to see any leaks when
stopping the program.
Diffstat (limited to 'src/libsdr/soapy.c')
-rw-r--r-- | src/libsdr/soapy.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsdr/soapy.c b/src/libsdr/soapy.c index 3306af1..c681e2f 100644 --- a/src/libsdr/soapy.c +++ b/src/libsdr/soapy.c @@ -27,6 +27,7 @@ #include <SoapySDR/Formats.h> #include "soapy.h" #include "../libdebug/debug.h" +#include "../liboptions/options.h" extern int sdr_rx_overflow; @@ -40,7 +41,7 @@ static uint64_t tx_count = 0; static int parse_args(SoapySDRKwargs *args, const char *_args_string) { - char *args_string = strdup(_args_string), *key, *val; + char *args_string = options_strdup(_args_string), *key, *val; memset(args, 0, sizeof(*args)); while (args_string && *args_string) { |