Test fix: size schedule leaked in a schedule API test case
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 20 Aug 2018 18:57:04 +0000 (14:57 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 20 Aug 2018 18:58:56 +0000 (14:58 -0400)
Reported-by: Coverity Scan (1395071 and 1395073 Resource leak)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
tests/regression/tools/rotation/schedule_api.c

index 0ab367152f066c08cf827c3df8e62b8526724d6c..491fe7b908aea41fa233e33b1188d0e85843f5d3 100644 (file)
@@ -109,6 +109,7 @@ void test_add_null_session(void)
        status = lttng_session_add_rotation_schedule(NULL, size_schedule);
        ok(status == LTTNG_ROTATION_STATUS_INVALID,
                        "NULL session name rejected by lttng_session_add_rotation_schedule()");
+       lttng_rotation_schedule_destroy(size_schedule);
 }
 
 void test_add_null_schedule(void)
@@ -156,6 +157,7 @@ void test_remove_null_session(void)
        status = lttng_session_remove_rotation_schedule(NULL, size_schedule);
        ok(status == LTTNG_ROTATION_STATUS_INVALID,
                        "NULL session name rejected by lttng_session_remove_rotation_schedule()");
+       lttng_rotation_schedule_destroy(size_schedule);
 }
 
 void test_remove_null_schedule(void)
This page took 0.02724 seconds and 5 git commands to generate.