X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fcommon%2Fconsumer%2Fconsumer.c;h=47df32958352b2477a84851bd56875a56696d5fc;hb=a837d60e6ef365c87361a4486087e40a791a4e5f;hp=4dec3e80964a4d07212734a18d719209c4a3abc9;hpb=504e362ffb535a616364a82f3de68b92d4c9663d;p=lttng-tools.git diff --git a/src/common/consumer/consumer.c b/src/common/consumer/consumer.c index 4dec3e809..47df32958 100644 --- a/src/common/consumer/consumer.c +++ b/src/common/consumer/consumer.c @@ -47,6 +47,7 @@ #include #include #include +#include struct lttng_consumer_global_data consumer_data = { .stream_count = 0, @@ -2052,6 +2053,7 @@ void consumer_del_metadata_stream(struct lttng_consumer_stream *stream, pthread_mutex_lock(&consumer_data.lock); pthread_mutex_lock(&stream->chan->lock); + pthread_mutex_lock(&stream->chan->metadata_cache->lock); pthread_mutex_lock(&stream->lock); /* Remove any reference to that stream. */ @@ -2077,6 +2079,7 @@ void consumer_del_metadata_stream(struct lttng_consumer_stream *stream, stream->chan->metadata_stream = NULL; pthread_mutex_unlock(&stream->lock); + pthread_mutex_unlock(&stream->chan->metadata_cache->lock); pthread_mutex_unlock(&stream->chan->lock); pthread_mutex_unlock(&consumer_data.lock);