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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Resolve some Coverity errors with IOThread changes

Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
---

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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]