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

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