From: Jérémie Galarneau Date: Mon, 20 Aug 2018 18:57:04 +0000 (-0400) Subject: Test fix: size schedule leaked in a schedule API test case X-Git-Url: https://git.efficios.com/?a=commitdiff_plain;h=4edd268b3d6c2b41c879d3f96de711b4a7e07ac1;p=deliverable%2Flttng-tools.git Test fix: size schedule leaked in a schedule API test case Reported-by: Coverity Scan (1395071 and 1395073 Resource leak) Signed-off-by: Jérémie Galarneau --- diff --git a/tests/regression/tools/rotation/schedule_api.c b/tests/regression/tools/rotation/schedule_api.c index 0ab367152..491fe7b90 100644 --- a/tests/regression/tools/rotation/schedule_api.c +++ b/tests/regression/tools/rotation/schedule_api.c @@ -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)