From: Jérémie Galarneau Date: Fri, 7 Aug 2015 21:01:37 +0000 (-0400) Subject: Fix: intialization of ust_metadata_poll_pipe to garbage value X-Git-Tag: v2.5.5~3 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=745a10bf7cc26933ca2e5bdc487322e00f83725f;p=lttng-tools.git Fix: intialization of ust_metadata_poll_pipe to garbage value Signed-off-by: Jérémie Galarneau --- diff --git a/src/common/ust-consumer/ust-consumer.c b/src/common/ust-consumer/ust-consumer.c index f891828f7..7eba01d10 100644 --- a/src/common/ust-consumer/ust-consumer.c +++ b/src/common/ust-consumer/ust-consumer.c @@ -327,8 +327,12 @@ static int create_ust_streams(struct lttng_consumer_channel *channel, /* Keep stream reference when creating metadata. */ if (channel->type == CONSUMER_CHANNEL_TYPE_METADATA) { channel->metadata_stream = stream; - stream->ust_metadata_poll_pipe[0] = ust_metadata_pipe[0]; - stream->ust_metadata_poll_pipe[1] = ust_metadata_pipe[1]; + if (channel->monitor) { + /* Set metadata poll pipe if we created one */ + memcpy(stream->ust_metadata_poll_pipe, + ust_metadata_pipe, + sizeof(ust_metadata_pipe)); + } } }