summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDong-hee Na <donghee.na@python.org>2022-02-11 08:48:47 (GMT)
committerGitHub <noreply@github.com>2022-02-11 08:48:47 (GMT)
commit0ac5372bf6b937ed44a8f9c4e402d024fcd80870 (patch)
tree2f2199c510eaa2199a99635e40bac828333a1e91
parentdd76b3f7d332dd6eced5cbc2ad2adfc397700b3d (diff)
downloadcpython-0ac5372bf6b937ed44a8f9c4e402d024fcd80870.zip
cpython-0ac5372bf6b937ed44a8f9c4e402d024fcd80870.tar.gz
cpython-0ac5372bf6b937ed44a8f9c4e402d024fcd80870.tar.bz2
bpo-46323: Fix double-free issue for borrowed refs (GH-31272)
-rw-r--r--Modules/_ctypes/callbacks.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/Modules/_ctypes/callbacks.c b/Modules/_ctypes/callbacks.c
index 6037f5f..bb59456 100644
--- a/Modules/_ctypes/callbacks.c
+++ b/Modules/_ctypes/callbacks.c
@@ -189,7 +189,6 @@ static void _CallPythonObject(void *mem,
CDataObject *obj = (CDataObject *)_PyObject_CallNoArgs(cnv);
if (!obj) {
PrintError("create argument %zd:\n", i);
- Py_DECREF(cnv);
goto Done;
}
if (!CDataObject_Check(obj)) {