Fix: check for kernel session metadata during init
authorDavid Goulet <dgoulet@efficios.com>
Wed, 1 Oct 2014 18:49:42 +0000 (14:49 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Wed, 1 Oct 2014 18:53:54 +0000 (14:53 -0400)
Fixes Coverity issue 1040159.

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

index 89c8760d2673bbda82f20ef2b308b95f7ec3d17f..d71f8ce25c47b75ea32125d8b156f3a8a74e87a6 100644 (file)
@@ -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;
This page took 0.026474 seconds and 4 git commands to generate.