From c59b0313b109adc89fe85eeb692154aa0c503e1a Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Tue, 11 Dec 2018 22:42:19 -0500 Subject: [PATCH] Fix: missing session reference release on kernel poll update MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The iteration performed on all sessions in update_kernel_poll() does not release the reference taken on the sessions. This causes the session(s) to be leaked and prevents the shutdown of the session daemon as it waits for all sessions to be destroyed before completing its teardown. Signed-off-by: Jérémie Galarneau --- src/bin/lttng-sessiond/manage-kernel.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bin/lttng-sessiond/manage-kernel.c b/src/bin/lttng-sessiond/manage-kernel.c index 35547743c..56bc0a93c 100644 --- a/src/bin/lttng-sessiond/manage-kernel.c +++ b/src/bin/lttng-sessiond/manage-kernel.c @@ -70,6 +70,7 @@ static int update_kernel_poll(struct lttng_poll_event *events) DBG("Channel fd %d added to kernel set", channel->fd); } session_unlock(session); + session_put(session); } session_unlock_list(); -- 2.34.1