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-Tag: v2.11.0-rc1~271 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=06b180a1fc9d4ee68cce95c64151ccc6868199c2;ds=sidebyside 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); }