mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
python: Fix bogus label placement
This commit is contained in:
parent
24442b60b9
commit
94538e14e2
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user