From: Jérémie Galarneau Date: Sun, 14 Feb 2016 22:48:43 +0000 (-0500) Subject: Fix: Possible use-after-free in create_ctx_type() X-Git-Tag: v2.8.0-rc1~166 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=8e32b63b5ad14e5a647ee580f618762c439a0d47;p=lttng-tools.git Fix: Possible use-after-free in create_ctx_type() Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng/commands/add_context.c b/src/bin/lttng/commands/add_context.c index d58ee908b..a802df0c1 100644 --- a/src/bin/lttng/commands/add_context.c +++ b/src/bin/lttng/commands/add_context.c @@ -728,6 +728,7 @@ struct ctx_type *create_ctx_type(void) if (!type->opt) { PERROR("malloc ctx_type options"); destroy_ctx_type(type); + type = NULL; goto end; } end: