From: Dong-hee Na Date: Fri, 11 Feb 2022 08:48:47 +0000 (+0900) Subject: bpo-46323: Fix double-free issue for borrowed refs (GH-31272) X-Git-Tag: v3.11.0a6~236 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0ac5372bf6b937ed44a8f9c4e402d024fcd80870;p=thirdparty%2FPython%2Fcpython.git bpo-46323: Fix double-free issue for borrowed refs (GH-31272) --- diff --git a/Modules/_ctypes/callbacks.c b/Modules/_ctypes/callbacks.c index 6037f5fd8428..bb59456a7321 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)) {