From: David Goulet Date: Mon, 29 Apr 2013 21:58:51 +0000 (-0400) Subject: Fix: add missing goto error in UST consumer X-Git-Tag: v2.2.0-rc2~30 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=4a2eb0cab793f67a94d7d9d10b534057804def95;p=lttng-tools.git Fix: add missing goto error in UST consumer On error, a channel set to NULL can be used causing a segfault when receiving the metadata. Reported-by: Mathieu Desnoyers Signed-off-by: David Goulet --- diff --git a/src/common/ust-consumer/ust-consumer.c b/src/common/ust-consumer/ust-consumer.c index 2bbc3f5e4..44a8240b0 100644 --- a/src/common/ust-consumer/ust-consumer.c +++ b/src/common/ust-consumer/ust-consumer.c @@ -1049,6 +1049,7 @@ int lttng_ustconsumer_recv_cmd(struct lttng_consumer_local_data *ctx, if (!channel) { ERR("UST consumer push metadata %" PRIu64 " not found", key); ret_code = LTTNG_ERR_UST_CHAN_NOT_FOUND; + goto end_msg_sessiond; } /* Tell session daemon we are ready to receive the metadata. */