From: David Goulet Date: Wed, 1 Oct 2014 18:52:33 +0000 (-0400) Subject: Fix: channel deref. after NULL check in kernel consumer X-Git-Tag: v2.5.1~2 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=50452803e14bf4ed7a2851966ff56983aa86fc7d;p=lttng-tools.git Fix: channel deref. after NULL check in kernel consumer Fixes Coverity issue 1040158. Signed-off-by: David Goulet --- diff --git a/src/common/kernel-consumer/kernel-consumer.c b/src/common/kernel-consumer/kernel-consumer.c index cca522dad..583b8b1af 100644 --- a/src/common/kernel-consumer/kernel-consumer.c +++ b/src/common/kernel-consumer/kernel-consumer.c @@ -774,7 +774,7 @@ int lttng_kconsumer_recv_cmd(struct lttng_consumer_local_data *ctx, * Send status code to session daemon. */ ret = consumer_send_status_msg(sock, ret_code); - if (ret < 0) { + if (ret < 0 || ret_code != LTTCOMM_CONSUMERD_SUCCESS) { /* Somehow, the session daemon is not responding anymore. */ goto end_nosignal; }