Commit f414fc40 authored by Armin Rigo's avatar Armin Rigo

Minor memory leak.

parent e12f7158
...@@ -536,6 +536,7 @@ list_ass_slice(PyListObject *a, int ilow, int ihigh, PyObject *v) ...@@ -536,6 +536,7 @@ list_ass_slice(PyListObject *a, int ilow, int ihigh, PyObject *v)
p = recycle = PyMem_NEW(PyObject *, (ihigh-ilow)); p = recycle = PyMem_NEW(PyObject *, (ihigh-ilow));
if (recycle == NULL) { if (recycle == NULL) {
PyErr_NoMemory(); PyErr_NoMemory();
Py_XDECREF(v_as_SF);
return -1; return -1;
} }
} }
...@@ -556,6 +557,7 @@ list_ass_slice(PyListObject *a, int ilow, int ihigh, PyObject *v) ...@@ -556,6 +557,7 @@ list_ass_slice(PyListObject *a, int ilow, int ihigh, PyObject *v)
if (list_resize(a, s+d) == -1) { if (list_resize(a, s+d) == -1) {
if (recycle != NULL) if (recycle != NULL)
PyMem_DEL(recycle); PyMem_DEL(recycle);
Py_XDECREF(v_as_SF);
return -1; return -1;
} }
item = a->ob_item; item = a->ob_item;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment