Fix: null pointer dereference in lttng_rotation_handle_destroy
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Tue, 10 Apr 2018 20:33:32 +0000 (16:33 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 10 Apr 2018 22:38:17 +0000 (18:38 -0400)
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/lib/lttng-ctl/rotate.c

index bdce8d8574a82f5bb1872a332d7023a79c47bac8..26cc5f94f8fb10361d43a20c968da7a9a6db9500 100644 (file)
@@ -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);
 }
This page took 0.0268 seconds and 5 git commands to generate.