[PATCH 2/2] conf: Fix label name in virDomainGraphicsListensParseXML

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

 



Use 'cleanup' since it's also used on success.
---
 src/conf/domain_conf.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 0b642a1..f208682 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -11136,20 +11136,20 @@ virDomainGraphicsListensParseXML(virDomainGraphicsDefPtr def,
     /* parse the <listen> subelements for graphics types that support it */
     nListens = virXPathNodeSet("./listen", ctxt, &listenNodes);
     if (nListens < 0)
-        goto error;
+        goto cleanup;

     if (nListens > 0) {
         size_t i;

         if (VIR_ALLOC_N(def->listens, nListens) < 0)
-            goto error;
+            goto cleanup;

         for (i = 0; i < nListens; i++) {
             if (virDomainGraphicsListenDefParseXML(&def->listens[i], def,
                                                    listenNodes[i],
                                                    i == 0 ? node : NULL,
                                                    flags) < 0)
-                goto error;
+                goto cleanup;

             def->nListens++;
         }
@@ -11177,7 +11177,7 @@ virDomainGraphicsListensParseXML(virDomainGraphicsDefPtr def,
      * <graphics/> element. */
     if (def->nListens == 0) {
         if (VIR_APPEND_ELEMENT(def->listens, def->nListens, newListen) < 0)
-            goto error;
+            goto cleanup;
     } else {
         virDomainGraphicsListenDefPtr glisten = &def->listens[0];

@@ -11195,7 +11195,7 @@ virDomainGraphicsListensParseXML(virDomainGraphicsDefPtr def,
     }

     ret = 0;
- error:
+ cleanup:
     virDomainGraphicsListenDefClear(&newListen);
     VIR_FREE(listenNodes);
     VIR_FREE(socketPath);
-- 
2.8.3

--
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]