提交 94538e14 编写于 作者: M Matthias Bolte

python: Fix bogus label placement

上级 24442b60
...@@ -1489,13 +1489,12 @@ libvirt_virNodeGetCellsFreeMemory(PyObject *self ATTRIBUTE_UNUSED, PyObject *arg ...@@ -1489,13 +1489,12 @@ libvirt_virNodeGetCellsFreeMemory(PyObject *self ATTRIBUTE_UNUSED, PyObject *arg
return(NULL); return(NULL);
if ((startCell < 0) || (maxCells <= 0) || (startCell + maxCells > 10000)) if ((startCell < 0) || (maxCells <= 0) || (startCell + maxCells > 10000))
goto error; return VIR_PY_NONE;
conn = (virConnectPtr) PyvirConnect_Get(pyobj_conn); conn = (virConnectPtr) PyvirConnect_Get(pyobj_conn);
freeMems = freeMems = malloc(maxCells * sizeof(*freeMems));
malloc(maxCells * sizeof(*freeMems));
if (freeMems == NULL) if (freeMems == NULL)
goto error; return VIR_PY_NONE;
LIBVIRT_BEGIN_ALLOW_THREADS; LIBVIRT_BEGIN_ALLOW_THREADS;
c_retval = virNodeGetCellsFreeMemory(conn, freeMems, startCell, maxCells); c_retval = virNodeGetCellsFreeMemory(conn, freeMems, startCell, maxCells);
...@@ -1503,7 +1502,6 @@ libvirt_virNodeGetCellsFreeMemory(PyObject *self ATTRIBUTE_UNUSED, PyObject *arg ...@@ -1503,7 +1502,6 @@ libvirt_virNodeGetCellsFreeMemory(PyObject *self ATTRIBUTE_UNUSED, PyObject *arg
if (c_retval < 0) { if (c_retval < 0) {
free(freeMems); free(freeMems);
error:
return VIR_PY_NONE; return VIR_PY_NONE;
} }
py_retval = PyList_New(c_retval); py_retval = PyList_New(c_retval);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册