Blame SOURCES/0006-INI-suppress-false-positive-coverity-warning.patch

d5ce1b
From 584dc25f2c31f4d8e5cf7154e0362e4d2504779c Mon Sep 17 00:00:00 2001
d5ce1b
From: Alexey Tikhonov <atikhono@redhat.com>
d5ce1b
Date: Thu, 5 Aug 2021 18:48:23 +0200
d5ce1b
Subject: [PATCH 6/6] INI: suppress false positive coverity warning
d5ce1b
d5ce1b
`get_str_cfg_array()` returns `char **array` that is composed of pointers
d5ce1b
to slices of `copy` so `copy` can't be freed here.
d5ce1b
d5ce1b
Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
d5ce1b
---
d5ce1b
 ini/ini_get_array.c | 1 +
d5ce1b
 1 file changed, 1 insertion(+)
d5ce1b
d5ce1b
diff --git a/ini/ini_get_array.c b/ini/ini_get_array.c
d5ce1b
index 30ed423..95d0b05 100644
d5ce1b
--- a/ini/ini_get_array.c
d5ce1b
+++ b/ini/ini_get_array.c
d5ce1b
@@ -164,6 +164,7 @@ static char **get_str_cfg_array(struct collection_item *item,
d5ce1b
     /* If count is 0 the copy needs to be freed */
d5ce1b
     if (count == 0) free(copy);
d5ce1b
     TRACE_FLOW_STRING("get_str_cfg_array", "Exit");
d5ce1b
+    /* coverity[leaked_storage : SUPPRESS] */ /* false positive warning */
d5ce1b
     return array;
d5ce1b
 }
d5ce1b
 
d5ce1b
-- 
d5ce1b
2.26.3
d5ce1b