From: David Goulet Date: Wed, 1 Oct 2014 18:49:42 +0000 (-0400) Subject: Fix: check for kernel session metadata during init X-Git-Tag: v2.5.1~3 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=7579642bd38012126d12eff44dc4e4885fe0aba9;p=lttng-tools.git Fix: check for kernel session metadata during init Fixes Coverity issue 1040159. Signed-off-by: David Goulet --- diff --git a/src/bin/lttng-sessiond/kernel-consumer.c b/src/bin/lttng-sessiond/kernel-consumer.c index 89c8760d2..d71f8ce25 100644 --- a/src/bin/lttng-sessiond/kernel-consumer.c +++ b/src/bin/lttng-sessiond/kernel-consumer.c @@ -373,7 +373,7 @@ int kernel_consumer_send_session(struct consumer_socket *sock, DBG("Sending session stream to kernel consumer"); - if (session->metadata_stream_fd >= 0) { + if (session->metadata_stream_fd >= 0 && session->metadata) { ret = kernel_consumer_add_metadata(sock, session, monitor); if (ret < 0) { goto error;