ust-consumer: fix: metadata stream lock taken before destroy
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Sun, 15 Sep 2019 19:10:20 +0000 (15:10 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sun, 15 Sep 2019 19:12:17 +0000 (15:12 -0400)
The lock of a metadata stream is taken when calling the stream's
destroy function after the completion of a snapshot. This is invalid
and does not appear to protect anything.

I am guessin that this was meant to be an 'unlock' invoked in the
error path of this functions.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/ust-consumer/ust-consumer.c

index b64ad04aaa3cd101b3275181b5b382a40fb62385..f8706d0ba88528e3dbf1e698de96eec9c4d5073d 100644 (file)
@@ -1079,7 +1079,6 @@ error_stream:
         * Clean up the stream completly because the next snapshot will use a new
         * metadata stream.
         */
-       pthread_mutex_lock(&metadata_stream->lock);
        consumer_stream_destroy(metadata_stream, NULL);
        cds_list_del(&metadata_stream->send_node);
        metadata_channel->metadata_stream = NULL;
This page took 0.026226 seconds and 4 git commands to generate.