From: Jonathan Rajotte Date: Tue, 3 Mar 2020 20:30:10 +0000 (-0500) Subject: Fix: lttng-ctl: _handle can be NULL X-Git-Tag: v2.13.0-rc1~729 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=1e2bb0af39b263c2bba440e3f20a58c596c870c6 Fix: lttng-ctl: _handle can be NULL lttng_destroy_session_no_wait does not care for the returned handle and passes a NULL _handle. This leads to an immediate LTTNG_ERR_INVALID failure on lttng_destroy_session_no_wait calls. lttng_destroy_session_ext already performs a null check on _handle before assigning it to transfer ownership of the handle. Fixes #1241 Signed-off-by: Jonathan Rajotte Change-Id: I9e8bee28382fa2250dee720037efdf77b4e776b8 Signed-off-by: Jérémie Galarneau --- diff --git a/src/lib/lttng-ctl/destruction-handle.c b/src/lib/lttng-ctl/destruction-handle.c index c6bb388eb..b345c2834 100644 --- a/src/lib/lttng-ctl/destruction-handle.c +++ b/src/lib/lttng-ctl/destruction-handle.c @@ -394,7 +394,7 @@ enum lttng_error_code lttng_destroy_session_ext(const char *session_name, int sessiond_socket = -1; struct lttng_destruction_handle *handle = NULL; - if (!session_name || !_handle) { + if (!session_name) { ret_code = LTTNG_ERR_INVALID; goto error; }