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.4.3~46 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=c9284ac829e04d7e0adb232d5008472026935a99;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 bcd554b30..6c047f9cb 100644 --- a/src/common/kernel-consumer/kernel-consumer.c +++ b/src/common/kernel-consumer/kernel-consumer.c @@ -773,7 +773,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; }