From: Jérémie Galarneau Date: Mon, 28 Oct 2019 20:26:48 +0000 (-0400) Subject: Fix: relayd: don't put un-acquired viewer trace chunk reference X-Git-Tag: v2.11.1~63 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=e3e85850a103b77b2eb39f2a848b8c262e56eb64;p=lttng-tools.git Fix: relayd: don't put un-acquired viewer trace chunk reference 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 --- diff --git a/src/bin/lttng-relayd/viewer-stream.c b/src/bin/lttng-relayd/viewer-stream.c index 25ee35e5c..f41bbe1a8 100644 --- a/src/bin/lttng-relayd/viewer-stream.c +++ b/src/bin/lttng-relayd/viewer-stream.c @@ -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;