instance.c: Fix a memory leak reported by scan-build.
[libsigrokdecode.git] / instance.c
index f8cd2c68f66804833d0f41e75e885c27c5b86a4d..a94118f2430de4991f70708522999fc49e02b53c 100644 (file)
@@ -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;
        }