From 307db950d03f305b6b705e5316e4a7571197144f Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Wed, 18 Sep 2019 13:47:26 -0400 Subject: [PATCH] Fix: release reference to trace chunk on index file creation failure MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The reference to a trace chunk that is acquired in _lttng_index_file_create_from_trace_chunk() is leaked on error. Release the reference in the function's error path. Signed-off-by: Jérémie Galarneau --- src/common/index/index.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/common/index/index.c b/src/common/index/index.c index 7c73dcfbd..b2e36211a 100644 --- a/src/common/index/index.c +++ b/src/common/index/index.c @@ -151,6 +151,7 @@ error: PERROR("Failed to close file descriptor of index file"); } } + lttng_trace_chunk_put(chunk); free(index_file); return NULL; } -- 2.34.1