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.
This commit is contained in:
Andreas Eversberg
2021-01-25 15:16:29 +01:00
parent 22cb70fb1b
commit 8c0a25f3b0
28 changed files with 144 additions and 62 deletions

View File

@@ -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) {