From: Jérémie Galarneau Date: Mon, 22 Mar 2021 17:02:56 +0000 (-0400) Subject: Tests: fix: log level rule: leak of rule after test X-Git-Tag: v2.13.0-rc1~200 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=f6acdcb90c1c50391826a38bb17f9a8897b65129;p=lttng-tools.git Tests: fix: log level rule: leak of rule after test 1451079 Resource leak The system resource will not be reclaimed and reused, reducing the future availability of the resource. In test_log_level_rule_at_least_as_severe_as: Leak of memory or pointers to system resources (CWE-404) Reported-by: Coverity Scan Signed-off-by: Jérémie Galarneau Change-Id: Ica923f9f010e51217ca62664faab99cb34999c0b --- diff --git a/tests/unit/test_log_level_rule.c b/tests/unit/test_log_level_rule.c index fb2e2daea..7ee040cd9 100644 --- a/tests/unit/test_log_level_rule.c +++ b/tests/unit/test_log_level_rule.c @@ -153,6 +153,7 @@ static void test_log_level_rule_exactly(void) test_log_level_rule_is_equal_exactly(); test_log_level_rule_serialize_deserialize(exactly); + lttng_log_level_rule_destroy(exactly); } static void test_log_level_rule_at_least_as_severe_as(void) @@ -175,6 +176,7 @@ static void test_log_level_rule_at_least_as_severe_as(void) test_log_level_rule_is_equal_at_least_as_severe_as(); test_log_level_rule_serialize_deserialize(at_least_as_severe_as); + lttng_log_level_rule_destroy(at_least_as_severe_as); } int main(int argc, const char *argv[])