From: Jérémie Galarneau Date: Thu, 3 Oct 2019 00:28:39 +0000 (-0400) Subject: Fix: liblttng-ctl: wrong variable used during argument validation X-Git-Tag: v2.12.0-rc1~341 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=cb98e7dd0dccc3b79b4f54d64be67f6d548f8933 Fix: liblttng-ctl: wrong variable used during argument validation Local 'handle' variable is used to check for NULL arguments while the provided argument is named '_handle'. This results in failures to destroy a session. Rename the variable used in the argument check. 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 d2559646f..55e160436 100644 --- a/src/lib/lttng-ctl/destruction-handle.c +++ b/src/lib/lttng-ctl/destruction-handle.c @@ -404,7 +404,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 || !_handle) { ret_code = LTTNG_ERR_INVALID; goto error; }