From 12ee10566a873fe94e6c0f8498e052672b8ed9b9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Tue, 25 Jan 2022 20:16:59 -0500 Subject: [PATCH] Fix: sessiond: use of null session when session is not found MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit A bad backport introduced this use of `session` even when it is NULL. Signed-off-by: Jérémie Galarneau Change-Id: If7d540229ef3a2a50e1e58d4f408cb61252ed45d --- src/bin/lttng-sessiond/rotation-thread.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/bin/lttng-sessiond/rotation-thread.c b/src/bin/lttng-sessiond/rotation-thread.c index 7ca9142ce..5e6042e85 100644 --- a/src/bin/lttng-sessiond/rotation-thread.c +++ b/src/bin/lttng-sessiond/rotation-thread.c @@ -587,8 +587,7 @@ int handle_job_queue(struct rotation_thread_handle *handle, session_lock_list(); session = job->session; if (!session) { - DBG("[rotation-thread] Session \"%s\" not found", - session->name); + DBG("[rotation-thread] Session not found"); /* * This is a non-fatal error, and we cannot report it to * the user (timer), so just print the error and @@ -600,7 +599,6 @@ int handle_job_queue(struct rotation_thread_handle *handle, * already been queued before it was destroyed. */ free(job); - session_put(session); session_unlock_list(); continue; } -- 2.34.1