Blame SOURCES/netcf-slience-a-false-Coverity-report.patch

9f21f6
From 2305151c1ebae09566302fd8097ef6757a02fbcf Mon Sep 17 00:00:00 2001
9f21f6
From: Laine Stump <laine@laine.org>
9f21f6
Date: Tue, 18 Sep 2018 12:36:45 -0400
9f21f6
Subject: [PATCH 4/7] slience a false Coverity report
9f21f6
9f21f6
Coverity complains that
9f21f6
9f21f6
   unref(nif, netcf_if);
9f21f6
9f21f6
sets nif to NULL without free'ing the memory it points to. But unref()
9f21f6
is a macro (defined in src/ref.h) that uses a refcount in the object
9f21f6
to automatically free it when there are no more pointers to it.
9f21f6
9f21f6
Since the code is correct, we add a comment that silences the Coverity warning
9f21f6
9f21f6
Signed-off-by: Laine Stump <laine@laine.org>
9f21f6
(cherry picked from commit 3c4ea18fe7e1279e5c7d033978eb45d86d759de3)
9f21f6
9f21f6
Resolves: https://bugzilla.redhat.com/1602628
9f21f6
Signed-off-by: Laine Stump <laine@laine.org>
9f21f6
---
9f21f6
 src/drv_redhat.c | 1 +
9f21f6
 1 file changed, 1 insertion(+)
9f21f6
9f21f6
diff --git a/src/drv_redhat.c b/src/drv_redhat.c
9f21f6
index 092ef5c..c073af8 100644
9f21f6
--- a/src/drv_redhat.c
9f21f6
+++ b/src/drv_redhat.c
9f21f6
@@ -504,6 +504,7 @@ struct netcf_if *drv_lookup_by_name(struct netcf *ncf, const char *name) {
9f21f6
     goto done;
9f21f6
 
9f21f6
  error:
9f21f6
+    /* coverity[overwrite_var] */
9f21f6
     unref(nif, netcf_if);
9f21f6
     FREE(name_dup);
9f21f6
  done:
9f21f6
-- 
9f21f6
2.18.1
9f21f6