Fix: src.ctf.fs: possible use-after-free in the error path
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Wed, 15 May 2019 19:21:34 +0000 (15:21 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 15 May 2019 20:09:23 +0000 (16:09 -0400)
Reported-by: scan-build - Use of memory after it is freed
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Change-Id: I5c19a45b0ddd11eed3872295efeb7b5201967419
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1303
Tested-by: jenkins
Reviewed-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
plugins/ctf/fs-src/fs.c

index 3a1c0e9973f1f5a2cc97e498428e514bb2598eb2..6f02c8de4570a40738c6886173338e4acb64073a 100644 (file)
@@ -797,6 +797,7 @@ int add_ds_file_to_ds_file_group(struct ctf_fs_trace *ctf_fs_trace,
 
 error:
        ctf_fs_ds_file_group_destroy(ds_file_group);
+       ds_file_group = NULL;
        ret = -1;
 
 end:
This page took 0.025224 seconds and 4 git commands to generate.