From: Francis Deslauriers Date: Wed, 15 May 2019 19:21:34 +0000 (-0400) Subject: Fix: src.ctf.fs: possible use-after-free in the error path X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=90e1eb09bdf90abdeb304e6d442978736f411e21 Fix: src.ctf.fs: possible use-after-free in the error path Reported-by: scan-build - Use of memory after it is freed Signed-off-by: Francis Deslauriers Change-Id: I5c19a45b0ddd11eed3872295efeb7b5201967419 Reviewed-on: https://review.lttng.org/c/babeltrace/+/1303 Tested-by: jenkins Reviewed-by: Jérémie Galarneau --- diff --git a/plugins/ctf/fs-src/fs.c b/plugins/ctf/fs-src/fs.c index 3a1c0e99..6f02c8de 100644 --- a/plugins/ctf/fs-src/fs.c +++ b/plugins/ctf/fs-src/fs.c @@ -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: