]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-46323: Fix double-free issue for borrowed refs (GH-31272)
authorDong-hee Na <donghee.na@python.org>
Fri, 11 Feb 2022 08:48:47 +0000 (17:48 +0900)
committerGitHub <noreply@github.com>
Fri, 11 Feb 2022 08:48:47 +0000 (17:48 +0900)
Modules/_ctypes/callbacks.c

index 6037f5fd842860895b039ce0ec8dcf02f4a0d478..bb59456a7321a2376decfd7014fdab2a4f325d5c 100644 (file)
@@ -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)) {