Fix: release reference to trace chunk on index file creation failure
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 18 Sep 2019 17:47:26 +0000 (13:47 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 19 Sep 2019 18:33:21 +0000 (14:33 -0400)
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 <jeremie.galarneau@efficios.com>
src/common/index/index.c

index 7c73dcfbd9e597def9249377348a462e6a86bd75..b2e36211aa4f8a7f5ce9d2be2784d91e3954310f 100644 (file)
@@ -151,6 +151,7 @@ error:
                        PERROR("Failed to close file descriptor of index file");
                }
        }
+       lttng_trace_chunk_put(chunk);
        free(index_file);
        return NULL;
 }
This page took 0.026378 seconds and 4 git commands to generate.