From 8243bf1242a85b68217f36784948ed752c9b7325 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Mon, 9 Sep 2019 10:46:21 -0400 Subject: [PATCH] Fix: return NULL on trace chunk registry failure MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit A free'd registry object can be returned in the error paths of lttng_trace_chunk_registry_create(). Right now, this happens whenever the allocation of the registry's hash table fails. Signed-off-by: Jérémie Galarneau --- src/common/trace-chunk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/trace-chunk.c b/src/common/trace-chunk.c index fe244ac36..9f0919a88 100644 --- a/src/common/trace-chunk.c +++ b/src/common/trace-chunk.c @@ -1096,7 +1096,7 @@ end: return registry; error: lttng_trace_chunk_registry_destroy(registry); - goto end; + return NULL; } LTTNG_HIDDEN -- 2.34.1