Fix: null pointer dereference in lttng_rotation_handle_destroy
[lttng-tools.git] / 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.026798 seconds and 4 git commands to generate.