summaryrefslogtreecommitdiff
path: root/instance.c
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2018-05-16 00:13:07 +0200
committerUwe Hermann <uwe@hermann-uwe.de>2018-05-16 12:17:42 +0200
commit25d3576134e7b57ca169e8e4ebd4e4ce5dcf62dd (patch)
treeed38fba935cb41f99462a92bab3ef14a8d5e75bd /instance.c
parent8ad9a3e48ddf79e08cd48073c953ea665c464005 (diff)
downloadlibsigrokdecode-25d3576134e7b57ca169e8e4ebd4e4ce5dcf62dd.tar.gz
libsigrokdecode-25d3576134e7b57ca169e8e4ebd4e4ce5dcf62dd.zip
instance.c: Fix a memory leak reported by scan-build.
instance.c:280:10: warning: Potential leak of memory pointed to by 'new_channelmap' pdch = g_slist_nth(di->decoder->channels, i)->data; ^~~~~~~~~~~
Diffstat (limited to 'instance.c')
-rw-r--r--instance.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/instance.c b/instance.c
index f8cd2c6..a94118f 100644
--- a/instance.c
+++ b/instance.c
@@ -280,6 +280,7 @@ SRD_API int srd_inst_channel_set_all(struct srd_decoder_inst *di,
pdch = g_slist_nth(di->decoder->channels, i)->data;
srd_err("Required channel '%s' (index %d) was not specified.",
pdch->id, i);
+ g_free(new_channelmap);
return SRD_ERR;
}