From: Jérémie Galarneau Date: Thu, 14 Nov 2019 22:12:08 +0000 (-0500) Subject: Fix: relayd: viewer session trace chunk not released on detach X-Git-Tag: v2.11.1~42 X-Git-Url: http://git.liburcu.org/?p=lttng-tools.git;a=commitdiff_plain;h=8af1d2a1eb1cbe9d35e9501e5ebdf90805dbfd51 Fix: relayd: viewer session trace chunk not released on detach The 'attach' command on a viewer session expects (asserts) the trace chunk of the viewer session to be NULL. This is reasonable as there is no reason to hold a reference to a trace chunk while no clients are attached. Release the reference to the trace chunk on detach. The relay session's trace chunk will be re-sampled (copied) when the next client attaches to the viewer session. Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-relayd/viewer-session.c b/src/bin/lttng-relayd/viewer-session.c index d394465ba..dbd85d47e 100644 --- a/src/bin/lttng-relayd/viewer-session.c +++ b/src/bin/lttng-relayd/viewer-session.c @@ -156,7 +156,8 @@ void viewer_session_close_one_session(struct relay_viewer_session *vsession, */ viewer_stream_put(vstream); } - + lttng_trace_chunk_put(vsession->current_trace_chunk); + vsession->current_trace_chunk = NULL; viewer_session_detach(vsession, session); }