diff options
author | Christian Heimes <christian@cheimes.de> | 2013-07-21 14:25:30 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2013-07-21 14:25:30 (GMT) |
commit | 71945880fb2024a61eb6dc328c4094a293a7f802 (patch) | |
tree | f2465ba931facd5686695f457f20bac40f4ca29c /Modules | |
parent | 992fe2ab84cf9296cf04e128dedc16bcaaad8225 (diff) | |
parent | 8c4c1f6e669453165a31e03b131f089ae1271067 (diff) | |
download | cpython-71945880fb2024a61eb6dc328c4094a293a7f802.zip cpython-71945880fb2024a61eb6dc328c4094a293a7f802.tar.gz cpython-71945880fb2024a61eb6dc328c4094a293a7f802.tar.bz2 |
Issue #18514: Fix unreachable Py_DECREF() call in PyCData_FromBaseObj()
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_ctypes/_ctypes.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c index 62a083b..6f40b1a 100644 --- a/Modules/_ctypes/_ctypes.c +++ b/Modules/_ctypes/_ctypes.c @@ -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; |