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:54:01 +0000 (14:54 -0400)
Fixes Coverity issue 1040158.

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

index bcd554b300944cdbfcf4ce9567638d2f3b5ae227..6c047f9cbfbae5df0412f09088aba23f0fabaf6c 100644 (file)
@@ -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;
                }
This page took 0.027338 seconds and 4 git commands to generate.