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

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