Commit 227f07e6 authored by Christian Heimes's avatar Christian Heimes

Issue #18514: Fix unreachable Py_DECREF() call in PyCData_FromBaseObj()

parent f91316ef
...@@ -49,6 +49,8 @@ Core and Builtins ...@@ -49,6 +49,8 @@ Core and Builtins
Library Library
------- -------
- Issue #18514: Fix unreachable Py_DECREF() call in PyCData_FromBaseObj()
- Issue #18513: Fix behaviour of cmath.rect w.r.t. signed zeros on OS X 10.8 + - Issue #18513: Fix behaviour of cmath.rect w.r.t. signed zeros on OS X 10.8 +
gcc. gcc.
......
...@@ -2671,8 +2671,8 @@ PyCData_FromBaseObj(PyObject *type, PyObject *base, Py_ssize_t index, char *adr) ...@@ -2671,8 +2671,8 @@ PyCData_FromBaseObj(PyObject *type, PyObject *base, Py_ssize_t index, char *adr)
cmem->b_index = index; cmem->b_index = index;
} else { /* copy contents of adr */ } else { /* copy contents of adr */
if (-1 == PyCData_MallocBuffer(cmem, dict)) { if (-1 == PyCData_MallocBuffer(cmem, dict)) {
return NULL;
Py_DECREF(cmem); Py_DECREF(cmem);
return NULL;
} }
memcpy(cmem->b_ptr, adr, dict->size); memcpy(cmem->b_ptr, adr, dict->size);
cmem->b_index = index; cmem->b_index = index;
......
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