From 52c5fe74881082047ec993945c52a80616639fe0 Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Mon, 22 May 2017 22:07:15 -0400 Subject: [PATCH] Fix: ctf.fs source: append all ctf_fs_trace objects to component's list MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This avoids obvious potential leaks. Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau --- plugins/ctf/fs-src/fs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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: -- 2.34.1