Tests: fix: log level rule: leak of rule after test
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 22 Mar 2021 17:02:56 +0000 (13:02 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 22 Mar 2021 17:03:02 +0000 (13:03 -0400)
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 <jeremie.galarneau@efficios.com>
Change-Id: Ica923f9f010e51217ca62664faab99cb34999c0b

tests/unit/test_log_level_rule.c

index fb2e2daeaaea1003cf36199546d16e900c2ab6ce..7ee040cd952c339cc4a8c99189f72b509f955ecb 100644 (file)
@@ -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[])
This page took 0.033019 seconds and 4 git commands to generate.