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>
Tue, 15 Sep 2015 17:15:51 +0000 (13:15 -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 058dbae4d894955480526b631e5b76b212765dd5..dfc8b31d0848ef2366ec5b66ef88b03b32ef31c9 100644 (file)
@@ -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;
This page took 0.027683 seconds and 4 git commands to generate.