From c9284ac829e04d7e0adb232d5008472026935a99 Mon Sep 17 00:00:00 2001 From: David Goulet Date: Wed, 1 Oct 2014 14:52:33 -0400 Subject: [PATCH] Fix: channel deref. after NULL check in kernel consumer Fixes Coverity issue 1040158. Signed-off-by: David Goulet --- src/common/kernel-consumer/kernel-consumer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.34.1