From: Jérémie Galarneau Date: Mon, 28 Oct 2019 20:53:48 +0000 (-0400) Subject: Fix: relayd: don't put un-acquired trace chunk reference X-Git-Tag: v2.11.1~62 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=ae7530efe70c28f341cc6b03835e658408103f70;p=lttng-tools.git Fix: relayd: don't put un-acquired trace chunk reference stream_create() should not release (put) the reference to the current 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/stream.c b/src/bin/lttng-relayd/stream.c index 3c61e3532..94698f8d8 100644 --- a/src/bin/lttng-relayd/stream.c +++ b/src/bin/lttng-relayd/stream.c @@ -644,7 +644,9 @@ end: stream_put(stream); stream = NULL; } - lttng_trace_chunk_put(current_trace_chunk); + if (acquired_reference) { + lttng_trace_chunk_put(current_trace_chunk); + } return stream; error_no_alloc: