[PATCH] python: Fix bogus label placement

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

 



---
 python/libvirt-override.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/python/libvirt-override.c b/python/libvirt-override.c
index 8be9af7..2b88796 100644
--- a/python/libvirt-override.c
+++ b/python/libvirt-override.c
@@ -1489,13 +1489,12 @@ libvirt_virNodeGetCellsFreeMemory(PyObject *self ATTRIBUTE_UNUSED, PyObject *arg
         return(NULL);
 
     if ((startCell < 0) || (maxCells <= 0) || (startCell + maxCells > 10000))
-        goto error;
+        return VIR_PY_NONE;
 
     conn = (virConnectPtr) PyvirConnect_Get(pyobj_conn);
-    freeMems =
-        malloc(maxCells * sizeof(*freeMems));
+    freeMems = malloc(maxCells * sizeof(*freeMems));
     if (freeMems == NULL)
-        goto error;
+        return VIR_PY_NONE;
 
     LIBVIRT_BEGIN_ALLOW_THREADS;
     c_retval = virNodeGetCellsFreeMemory(conn, freeMems, startCell, maxCells);
@@ -1503,7 +1502,6 @@ libvirt_virNodeGetCellsFreeMemory(PyObject *self ATTRIBUTE_UNUSED, PyObject *arg
 
     if (c_retval < 0) {
         free(freeMems);
-error:
         return VIR_PY_NONE;
     }
     py_retval = PyList_New(c_retval);
-- 
1.7.4.1

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