From: Antoine Busque Date: Sun, 13 Sep 2015 03:48:11 +0000 (-0400) Subject: Fix: double free on enable-event X-Git-Tag: v2.8.0-rc1~347 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=60d21fa25f38b47b5867377035b68830105afcf9;p=lttng-tools.git Fix: double free on enable-event Signed-off-by: Antoine Busque Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index 058dbae4d..dfc8b31d0 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -1633,9 +1633,10 @@ static int _cmd_enable_event(struct ltt_session *session, event->type = LTTNG_EVENT_SYSCALL; /* Hack */ ret = event_kernel_enable_event(kchan, event, filter_expression_a, filter_a); + /* We have passed ownership */ + filter_expression_a = NULL; + filter_a = NULL; if (ret != LTTNG_OK) { - free(filter_expression_a); - free(filter_a); goto error; } break;