[libvirt] [PATCH 3/2] conf: Resolve some Coverity errors

John Ferlan jferlan at redhat.com
Mon Apr 27 19:08:42 UTC 2015


Resolve some Coverity errors with IOThread changes

Signed-off-by: John Ferlan <jferlan at redhat.com>
---

I ran my Coverity checker too, but I looked at the wrong results
tab when I went to check the results... I looked at a previous run
which was clean, not the most recent run which wasn't.  Doing
multiple compiles in separate tabs and just couldn't keep it all
straight (<sigh> - old age I guess)

 src/conf/domain_conf.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 0b18720..fc48ed5 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -13253,6 +13253,7 @@ virDomainIOThreadIDDefParseXML(xmlNodePtr node,
 
  error:
     virDomainIOThreadIDDefFree(iothrid);
+    iothrid = NULL;
     goto cleanup;
 }
 
@@ -13342,7 +13343,7 @@ virDomainIOThreadPinDefParseXML(xmlNodePtr node,
 {
     int ret = -1;
     virDomainIOThreadIDDefPtr iothrid;
-    virBitmapPtr cpumask;
+    virBitmapPtr cpumask = NULL;
     xmlNodePtr oldnode = ctxt->node;
     unsigned int iothreadid;
     char *tmp = NULL;
@@ -13372,6 +13373,7 @@ virDomainIOThreadPinDefParseXML(xmlNodePtr node,
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
                        _("Cannot find 'iothread' : %u"),
                        iothreadid);
+        goto cleanup;
     }
 
     if (!(tmp = virXMLPropString(node, "cpuset"))) {
-- 
2.1.0




More information about the libvir-list mailing list