From: Jonathan Rajotte Date: Tue, 10 Apr 2018 20:33:32 +0000 (-0400) Subject: Fix: null pointer dereference in lttng_rotation_handle_destroy X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;h=06b180a1fc9d4ee68cce95c64151ccc6868199c2;hp=0dbc2034c9571ec342d382bf87231775563f8624;p=lttng-tools.git Fix: null pointer dereference in lttng_rotation_handle_destroy Signed-off-by: Jonathan Rajotte Signed-off-by: Jérémie Galarneau --- 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); }