Fix: trace_ust_destroy_metadata should check for NULL pointer
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 19 Mar 2012 22:15:50 +0000 (18:15 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 19 Mar 2012 22:15:50 +0000 (18:15 -0400)
Acked-by: David Goulet <dgoulet@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
src/bin/lttng-sessiond/trace-ust.c

index 5a8fc7dd988e300a70e6fd56b86b8a7bab6bae74..7b5c3c788e4ff622a18d74f7fc2ce01555483359 100644 (file)
@@ -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);
 }
 
This page took 0.026777 seconds and 4 git commands to generate.