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

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

index cca522dadd5a3210fd5ef79d5496e13eeedddfbc..583b8b1af7a0e43a3337ff104baf6db1dcea0f30 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.025959 seconds and 4 git commands to generate.