Fix: relayd: viewer session trace chunk not released on detach
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 14 Nov 2019 22:12:08 +0000 (17:12 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 18 Nov 2019 18:45:34 +0000 (13:45 -0500)
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 <jeremie.galarneau@efficios.com>
src/bin/lttng-relayd/viewer-session.c

index d394465ba1c51d3f1575ed7630c2f6dc4c942908..dbd85d47e6b171591e9c14a11dbf6d12424102a2 100644 (file)
@@ -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);
 }
 
This page took 0.025527 seconds and 4 git commands to generate.