X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Ftrace-kernel.c;h=29432de49a0355b16863ab69189929a6c37719f3;hb=6faa26cafc21ce8d5b8f20ae4d2682092fd74b03;hp=33a9e7e5578daf8454e5ccc97bc3d97d85e7934f;hpb=00a620843422e5c972aee0ada2181b811fc81b92;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/trace-kernel.c b/src/bin/lttng-sessiond/trace-kernel.c index 33a9e7e55..29432de49 100644 --- a/src/bin/lttng-sessiond/trace-kernel.c +++ b/src/bin/lttng-sessiond/trace-kernel.c @@ -15,7 +15,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#define _GNU_SOURCE #define _LGPL_SOURCE #include #include @@ -162,14 +161,6 @@ struct ltt_kernel_session *trace_kernel_create_session(void) goto error; } - /* - * The tmp_consumer stays NULL until a set_consumer_uri command is - * executed. At this point, the consumer should be nullify until an - * enable_consumer command. This assignment is symbolic since we've zmalloc - * the struct. - */ - lks->tmp_consumer = NULL; - return lks; error: @@ -258,6 +249,7 @@ error: /* * Allocate and initialize a kernel event. Set name and event type. + * We own filter_expression, and filter. * * Return pointer to structure or NULL. */ @@ -327,6 +319,8 @@ struct ltt_kernel_event *trace_kernel_create_event(struct lttng_event *ev, return lke; error: + free(filter_expression); + free(filter); free(lke); free(attr); return NULL; @@ -575,8 +569,7 @@ void trace_kernel_destroy_session(struct ltt_kernel_session *session) } /* Wipe consumer output object */ - consumer_destroy_output(session->consumer); - consumer_destroy_output(session->tmp_consumer); + consumer_output_put(session->consumer); free(session); }