Fix: destroy streams for kernel snapshot sessions as well
authorJulien Desfossez <jdesfossez@efficios.com>
Fri, 5 Jul 2013 17:37:01 +0000 (13:37 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Fri, 5 Jul 2013 18:25:28 +0000 (14:25 -0400)
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/common/consumer.c

index 0005b1039cb27d6ced5dfac3537e72bbf737fce0..30a95b48f4fc7d12e307e3752ff9f2b4d2bc19cd 100644 (file)
@@ -292,21 +292,22 @@ void consumer_del_channel(struct lttng_consumer_channel *channel)
 
        pthread_mutex_lock(&consumer_data.lock);
 
+       /* Delete streams that might have been left in the stream list. */
+       cds_list_for_each_entry_safe(stream, stmp, &channel->streams.head,
+                       send_node) {
+               cds_list_del(&stream->send_node);
+               /*
+                * Once a stream is added to this list, the buffers were created so
+                * we have a guarantee that this call will succeed.
+                */
+               consumer_stream_destroy(stream, NULL);
+       }
+
        switch (consumer_data.type) {
        case LTTNG_CONSUMER_KERNEL:
                break;
        case LTTNG_CONSUMER32_UST:
        case LTTNG_CONSUMER64_UST:
-               /* Delete streams that might have been left in the stream list. */
-               cds_list_for_each_entry_safe(stream, stmp, &channel->streams.head,
-                               send_node) {
-                       cds_list_del(&stream->send_node);
-                       /*
-                        * Once a stream is added to this list, the buffers were created so
-                        * we have a guarantee that this call will succeed.
-                        */
-                       consumer_stream_destroy(stream, NULL);
-               }
                lttng_ustconsumer_del_channel(channel);
                break;
        default:
This page took 0.034526 seconds and 4 git commands to generate.