[lttng-dev] [PATCH lttng-tools] Fix: memory leak when UST events are enabled with exclusions

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Thu Jan 30 17:59:35 EST 2014


David: this needs to be merged.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>

Thanks,

Mathieu

----- Original Message -----
> From: "Jérémie Galarneau" <jeremie.galarneau at efficios.com>
> To: lttng-dev at lists.lttng.org
> Sent: Monday, January 20, 2014 12:51:12 PM
> Subject: [lttng-dev] [PATCH lttng-tools] Fix: memory leak when UST events	are enabled with exclusions
> 
> Signed-off-by: Jérémie Galarneau <jeremie.galarneau at efficios.com>
> ---
>  src/bin/lttng-sessiond/trace-ust.c | 1 +
>  src/bin/lttng-sessiond/trace-ust.h | 2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/bin/lttng-sessiond/trace-ust.c
> b/src/bin/lttng-sessiond/trace-ust.c
> index 70b3a91..c08246a 100644
> --- a/src/bin/lttng-sessiond/trace-ust.c
> +++ b/src/bin/lttng-sessiond/trace-ust.c
> @@ -504,6 +504,7 @@ void trace_ust_destroy_event(struct ltt_ust_event *event)
>  
>  	DBG2("Trace destroy UST event %s", event->attr.name);
>  	free(event->filter);
> +	free(event->exclusion);
>  	free(event);
>  }
>  
> diff --git a/src/bin/lttng-sessiond/trace-ust.h
> b/src/bin/lttng-sessiond/trace-ust.h
> index f2f8c7e..07af0f1 100644
> --- a/src/bin/lttng-sessiond/trace-ust.h
> +++ b/src/bin/lttng-sessiond/trace-ust.h
> @@ -50,7 +50,7 @@ struct ltt_ust_event {
>  	struct lttng_ust_event attr;
>  	struct lttng_ht_node_str node;
>  	struct lttng_ust_filter_bytecode *filter;
> -	const struct lttng_event_exclusion *exclusion;
> +	struct lttng_event_exclusion *exclusion;
>  };
>  
>  /* UST channel */
> --
> 1.8.5.2
> 
> 
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
> 

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list