Fix: double free on enable-event
authorAntoine Busque <abusque@efficios.com>
Sun, 13 Sep 2015 03:48:11 +0000 (23:48 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 17 Sep 2015 00:54:14 +0000 (20:54 -0400)
Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/cmd.c

index 7b36ae252a4660a29291472fcfbf80d57aabc3dc..cebe00169850c8bb667b729fdfbfb11e873286af 100644 (file)
@@ -1619,9 +1619,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;
This page took 0.027337 seconds and 4 git commands to generate.