Fix: free metadata cache after grace period in consumer
[lttng-tools.git] / src / common / consumer.c
index 526fbbf35c157f2bf545ef53b68dc0e45ef17365..f2ccf9536b147b72574638046135da3e425b771a 100644 (file)
@@ -286,6 +286,17 @@ static void free_channel_rcu(struct rcu_head *head)
        struct lttng_consumer_channel *channel =
                caa_container_of(node, struct lttng_consumer_channel, node);
 
        struct lttng_consumer_channel *channel =
                caa_container_of(node, struct lttng_consumer_channel, node);
 
+       switch (consumer_data.type) {
+       case LTTNG_CONSUMER_KERNEL:
+               break;
+       case LTTNG_CONSUMER32_UST:
+       case LTTNG_CONSUMER64_UST:
+               lttng_ustconsumer_free_channel(channel);
+               break;
+       default:
+               ERR("Unknown consumer_data type");
+               abort();
+       }
        free(channel);
 }
 
        free(channel);
 }
 
This page took 0.023269 seconds and 4 git commands to generate.