Fix: return NULL on trace chunk registry failure
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 9 Sep 2019 14:46:21 +0000 (10:46 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 19 Sep 2019 19:31:48 +0000 (15:31 -0400)
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 <jeremie.galarneau@efficios.com>
src/common/trace-chunk.c

index fe244ac36594ebbcec7c81f8b9b331d9540f7a59..9f0919a8896b7756121ffe18d6580e0550637f37 100644 (file)
@@ -1096,7 +1096,7 @@ end:
        return registry;
 error:
        lttng_trace_chunk_registry_destroy(registry);
-       goto end;
+       return NULL;
 }
 
 LTTNG_HIDDEN
This page took 0.026847 seconds and 4 git commands to generate.