X-Git-Url: https://sigrok.org/gitweb/?p=sigrok-cli.git;a=blobdiff_plain;f=parsers.c;h=206e1d639940f6a042ed87b55704f958ab614456;hp=1dfc16cba283f039280b30761e04b07c9b757312;hb=c25c8e457b4f0ce20000164edb391803d58e4c07;hpb=3b36b10d8885e27aeab259585fcc5c02511812ed diff --git a/parsers.c b/parsers.c index 1dfc16c..206e1d6 100644 --- a/parsers.c +++ b/parsers.c @@ -1,5 +1,5 @@ /* - * This file is part of the sigrok project. + * This file is part of the sigrok-cli project. * * Copyright (C) 2011 Bert Vermeulen * @@ -54,6 +54,7 @@ GSList *parse_probestring(struct sr_dev_inst *sdi, const char *probestring) ret = SR_OK; range = NULL; + names = NULL; probelist = NULL; tokens = g_strsplit(probestring, ",", 0); for (i = 0; tokens[i]; i++) { @@ -137,6 +138,9 @@ GSList *parse_probestring(struct sr_dev_inst *sdi, const char *probestring) if (range) g_strfreev(range); + if (names) + g_strfreev(names); + if (ret != SR_OK) { g_slist_free(probelist); probelist = NULL;