Fix: channel deref. after NULL check in kernel consumer
authorDavid Goulet <dgoulet@efficios.com>
Wed, 1 Oct 2014 18:52:33 +0000 (14:52 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Wed, 1 Oct 2014 18:52:33 +0000 (14:52 -0400)
Fixes Coverity issue 1040158.

Signed-off-by: David Goulet <dgoulet@efficios.com>
src/common/kernel-consumer/kernel-consumer.c

index 904462da68625905fb5293ad28aa269b4c11ab3f..cbd1b5aac223962275b7be3472c7f498eb761077 100644 (file)
@@ -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;
                }
This page took 0.02578 seconds and 4 git commands to generate.