From 06b180a1fc9d4ee68cce95c64151ccc6868199c2 Mon Sep 17 00:00:00 2001 From: Jonathan Rajotte Date: Tue, 10 Apr 2018 16:33:32 -0400 Subject: [PATCH] Fix: null pointer dereference in lttng_rotation_handle_destroy MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jonathan Rajotte Signed-off-by: Jérémie Galarneau --- src/lib/lttng-ctl/rotate.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/lttng-ctl/rotate.c b/src/lib/lttng-ctl/rotate.c index bdce8d857..26cc5f94f 100644 --- a/src/lib/lttng-ctl/rotate.c +++ b/src/lib/lttng-ctl/rotate.c @@ -268,6 +268,9 @@ end: void lttng_rotation_handle_destroy( struct lttng_rotation_handle *rotation_handle) { + if (!rotation_handle) { + return; + } lttng_trace_archive_location_destroy(rotation_handle->archive_location); free(rotation_handle); } -- 2.34.1