Fix: use of uninitialized ret value in lttng_abi_open_metadata_stream
[lttng-modules.git] / lttng-abi.c
index e193f4377734d1a47a8d881125de8d93befe0cc3..478a5912f89a0ebee71185885119bd3d85e1aff1 100644 (file)
@@ -998,8 +998,11 @@ int lttng_abi_open_metadata_stream(struct file *channel_file)
                goto notransport;
        }
 
-       if (!lttng_kref_get(&session->metadata_cache->refcount))
+       if (!lttng_kref_get(&session->metadata_cache->refcount)) {
+               ret = -EOVERFLOW;
                goto kref_error;
+       }
+
        ret = lttng_abi_create_stream_fd(channel_file, stream_priv,
                        &lttng_metadata_ring_buffer_file_operations);
        if (ret < 0)
This page took 0.025251 seconds and 4 git commands to generate.