diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2013-11-18 17:35:55 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2013-11-18 17:35:55 (GMT) |
commit | 2399ad51d435495636106ce2695712499983a715 (patch) | |
tree | aef5c4019580ff18b9aa89b39553b22208849a66 | |
parent | ed4a1c57034d53bf217d64a771208d372ad9e1a5 (diff) | |
download | cpython-2399ad51d435495636106ce2695712499983a715.zip cpython-2399ad51d435495636106ce2695712499983a715.tar.gz cpython-2399ad51d435495636106ce2695712499983a715.tar.bz2 |
Issue #19437: Fix error handling of CDataType_from_buffer()
KeepRef() decreases the reference counter of its 'keep' parameter on error
-rw-r--r-- | Modules/_ctypes/_ctypes.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c index f47dbdf..be0f33a 100644 --- a/Modules/_ctypes/_ctypes.c +++ b/Modules/_ctypes/_ctypes.c @@ -454,7 +454,6 @@ CDataType_from_buffer(PyObject *type, PyObject *args) Py_INCREF(obj); if (-1 == KeepRef((CDataObject *)result, -1, obj)) { - Py_DECREF(result); return NULL; } return result; |