From: Mathieu Desnoyers Date: Mon, 19 Mar 2012 22:15:50 +0000 (-0400) Subject: Fix: trace_ust_destroy_metadata should check for NULL pointer X-Git-Tag: v2.0.0-rc4~16 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=abc9138a92fb32f5525f29160aabd6dc18e441cd;p=lttng-tools.git Fix: trace_ust_destroy_metadata should check for NULL pointer Acked-by: David Goulet Signed-off-by: Mathieu Desnoyers --- diff --git a/src/bin/lttng-sessiond/trace-ust.c b/src/bin/lttng-sessiond/trace-ust.c index 5a8fc7dd9..7b5c3c788 100644 --- a/src/bin/lttng-sessiond/trace-ust.c +++ b/src/bin/lttng-sessiond/trace-ust.c @@ -459,8 +459,10 @@ static void destroy_channel_rcu(struct rcu_head *head) */ void trace_ust_destroy_metadata(struct ltt_ust_metadata *metadata) { + if (!metadata->handle) { + return; + } DBG2("Trace UST destroy metadata %d", metadata->handle); - free(metadata); }