Fix: ctf.fs source: append all ctf_fs_trace objects to component's list
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 23 May 2017 02:07:15 +0000 (22:07 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sun, 28 May 2017 16:57:44 +0000 (12:57 -0400)
This avoids obvious potential leaks.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
plugins/ctf/fs-src/fs.c

index 6fc53e3c30da2f47f917e09c735defdbdd03b2eb..57468fbf1a7af44d319d6f8ae545ed022e52e449 100644 (file)
@@ -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:
This page took 0.026247 seconds and 4 git commands to generate.