Fix: lttng-ctl: _handle can be NULL
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Tue, 3 Mar 2020 20:30:10 +0000 (15:30 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 6 Apr 2020 14:35:23 +0000 (10:35 -0400)
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 <jonathan.rajotte-julien@efficios.com>
Change-Id: I9e8bee28382fa2250dee720037efdf77b4e776b8
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/lib/lttng-ctl/destruction-handle.c

index 55e1604363bfd87648b91f7937fdcb58771d0c84..ee153879200f1313ea448adcd4e77f92c9b87859 100644 (file)
@@ -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) {
                ret_code = LTTNG_ERR_INVALID;
                goto error;
        }
This page took 0.025042 seconds and 4 git commands to generate.