X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fcommon%2Fust-consumer%2Fust-consumer.c;h=ff4ba25b9730f0a2896ef798e8869ca7c09aa1cc;hb=f5a0c9cf497ccd3f438832072ff9c4c06264c16c;hp=f318af153ca3aca1dcdd1573590d7447de61490c;hpb=e1b71bdc87cefd070ae082d88f6d4af5f2bcbd62;p=lttng-tools.git diff --git a/src/common/ust-consumer/ust-consumer.c b/src/common/ust-consumer/ust-consumer.c index f318af153..ff4ba25b9 100644 --- a/src/common/ust-consumer/ust-consumer.c +++ b/src/common/ust-consumer/ust-consumer.c @@ -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; }