]> sigrok.org Git - sigrok-cli.git/commit
parserc.c: Fix memory leak from g_strsplit
authorAlexandru Gagniuc <redacted>
Wed, 19 Dec 2012 07:31:58 +0000 (01:31 -0600)
committerUwe Hermann <redacted>
Tue, 1 Jan 2013 23:28:59 +0000 (00:28 +0100)
commit66149c2013c0009c226770e5679ae63fd834bb78
treecf3d00aa43e45c49c54e9cdabd5d8ba29991574e
parenta2853311f3a1d9a6e43bd08efbd960f079431bc0
parserc.c: Fix memory leak from g_strsplit

g_strsplit() returns a newly-allocated NULL-terminated array of strings.
g_strfreev() must be used to free it, once it is no longer needed.

The probe 'names' were not freed properly, causing a "definitely lost" memory
leak.

Call g_strfreev(names) to properly free the memory.

Signed-off-by: Alexandru Gagniuc <redacted>
parsers.c