From: Philippe Proulx Date: Tue, 23 May 2017 02:07:15 +0000 (-0400) Subject: Fix: ctf.fs source: append all ctf_fs_trace objects to component's list X-Git-Tag: v2.0.0-pre1~208 X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=52c5fe74881082047ec993945c52a80616639fe0 Fix: ctf.fs source: append all ctf_fs_trace objects to component's list This avoids obvious potential leaks. Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau --- diff --git a/plugins/ctf/fs-src/fs.c b/plugins/ctf/fs-src/fs.c index 6fc53e3c..57468fbf 100644 --- a/plugins/ctf/fs-src/fs.c +++ b/plugins/ctf/fs-src/fs.c @@ -662,10 +662,11 @@ int create_ctf_fs_traces(struct ctf_fs_component *ctf_fs, trace_path->str); goto error; } + + g_ptr_array_add(ctf_fs->traces, ctf_fs_trace); + ctf_fs_trace = NULL; } - g_ptr_array_add(ctf_fs->traces, ctf_fs_trace); - ctf_fs_trace = NULL; goto end; error: