Fix: relayd: don't put un-acquired viewer trace chunk reference
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 28 Oct 2019 20:26:48 +0000 (16:26 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 29 Oct 2019 04:01:44 +0000 (00:01 -0400)
viewer_stream_create() should not release (put) the reference to
the viewer_trace_chunk in its error path if it could not acquire
a new reference in the first place.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-relayd/viewer-stream.c

index 25ee35e5cadb97787a23e238dccfbcdae0924820..f41bbe1a8de8c45a13b96c05491f64e16694b244 100644 (file)
@@ -173,7 +173,7 @@ error:
        if (vstream) {
                viewer_stream_destroy(vstream);
        }
-       if (viewer_trace_chunk) {
+       if (viewer_trace_chunk && acquired_reference) {
                lttng_trace_chunk_put(viewer_trace_chunk);
        }
        return NULL;
This page took 0.033281 seconds and 4 git commands to generate.