mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
Issue #18514: Fix unreachable Py_DECREF() call in PyCData_FromBaseObj()
This commit is contained in:
parent
96f628f487
commit
8c4c1f6e66
2 changed files with 3 additions and 1 deletions
|
|
@ -49,6 +49,8 @@ Core and Builtins
|
|||
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 +
|
||||
gcc.
|
||||
|
||||
|
|
|
|||
|
|
@ -2671,8 +2671,8 @@ PyCData_FromBaseObj(PyObject *type, PyObject *base, Py_ssize_t index, char *adr)
|
|||
cmem->b_index = index;
|
||||
} else { /* copy contents of adr */
|
||||
if (-1 == PyCData_MallocBuffer(cmem, dict)) {
|
||||
return NULL;
|
||||
Py_DECREF(cmem);
|
||||
return NULL;
|
||||
}
|
||||
memcpy(cmem->b_ptr, adr, dict->size);
|
||||
cmem->b_index = index;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue