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.12.0-rc1~273 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=e4650a96a51b8c5e5b2574b2defa981df07f5cd0;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;