From: Jérémie Galarneau Date: Wed, 26 Jan 2022 01:16:59 +0000 (-0500) Subject: Fix: sessiond: use of null session when session is not found X-Git-Tag: v2.12.8~2 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=12ee10566a873fe94e6c0f8498e052672b8ed9b9;p=lttng-tools.git Fix: sessiond: use of null session when session is not found A bad backport introduced this use of `session` even when it is NULL. Signed-off-by: Jérémie Galarneau Change-Id: If7d540229ef3a2a50e1e58d4f408cb61252ed45d --- 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; }