Fix: destroy metadata stream on setup metadata error path
authorDavid Goulet <dgoulet@efficios.com>
Thu, 4 Jul 2013 18:57:06 +0000 (14:57 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Fri, 5 Jul 2013 18:26:02 +0000 (14:26 -0400)
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/common/ust-consumer/ust-consumer.c

index f318af153ca3aca1dcdd1573590d7447de61490c..ff4ba25b9730f0a2896ef798e8869ca7c09aa1cc 100644 (file)
@@ -726,7 +726,7 @@ static int setup_metadata(struct lttng_consumer_local_data *ctx, uint64_t key)
        if (cds_list_empty(&metadata->streams.head)) {
                ERR("Metadata channel key %" PRIu64 ", no stream available.", key);
                ret = LTTCOMM_CONSUMERD_ERROR_METADATA;
-               goto error;
+               goto error_no_stream;
        }
 
        /* Send metadata stream to relayd if needed. */
@@ -758,7 +758,9 @@ error:
         * the stream is still in the local stream list of the channel. This call
         * will make sure to clean that list.
         */
-       consumer_del_channel(metadata);
+       cds_list_del(&metadata->metadata_stream->send_node);
+       consumer_stream_destroy(metadata->metadata_stream, NULL);
+error_no_stream:
 end:
        return ret;
 }
This page took 0.027925 seconds and 4 git commands to generate.