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.6.0-rc1~16 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=f261ad0ad8d93634b4a6d7581628e236aa696049 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 904462da6..cbd1b5aac 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; }