diff options
author | Matthias Bolte <matthias.bolte@googlemail.com> | 2011-07-06 19:25:18 +0200 |
---|---|---|
committer | Matthias Bolte <matthias.bolte@googlemail.com> | 2011-07-07 13:24:22 +0200 |
commit | a9c49d46fd67a4414910b402d6c632489ec85400 (patch) | |
tree | 65d483857fb1f68e1d0ab49e2801895e481b8630 | |
parent | 5d64c2d212eea666416d254e3540c4b181c0290e (diff) | |
download | libvirt-python-v6-a9c49d46fd67a4414910b402d6c632489ec85400.tar.gz libvirt-python-v6-a9c49d46fd67a4414910b402d6c632489ec85400.tar.xz libvirt-python-v6-a9c49d46fd67a4414910b402d6c632489ec85400.zip |
python: Fix bogus label placement
-rw-r--r-- | libvirt-override.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libvirt-override.c b/libvirt-override.c index 8be9af7..2b88796 100644 --- a/libvirt-override.c +++ b/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); |