mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
Issue #18514: Fix unreachable Py_DECREF() call in PyCData_FromBaseObj()
This commit is contained in:
commit
71945880fb
2 changed files with 3 additions and 1 deletions
|
|
@ -159,6 +159,8 @@ Core and Builtins
|
|||
Library
|
||||
-------
|
||||
|
||||
- Issue #18514: Fix unreachable Py_DECREF() call in PyCData_FromBaseObj()
|
||||
|
||||
- Issue #9177: Calling read() or write() now raises ValueError, not
|
||||
AttributeError, on a closed SSL socket. Patch by Senko Rasic.
|
||||
|
||||
|
|
|
|||
|
|
@ -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