Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e02ab59

Browse files
ZackerySpytzYhg1s
authored andcommitted
bpo-38532: Add missing decrefs in PyCFuncPtr_FromDll() (GH-16857)
1 parent b789202 commit e02ab59

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Modules/_ctypes/_ctypes.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3554,10 +3554,12 @@ PyCFuncPtr_FromDll(PyTypeObject *type, PyObject *args, PyObject *kwds)
35543554
if (PySys_Audit("ctypes.dlsym",
35553555
((uintptr_t)name & ~0xFFFF) ? "Os" : "On",
35563556
dll, name) < 0) {
3557+
Py_DECREF(ftuple);
35573558
return NULL;
35583559
}
35593560
#else
35603561
if (PySys_Audit("ctypes.dlsym", "Os", dll, name) < 0) {
3562+
Py_DECREF(ftuple);
35613563
return NULL;
35623564
}
35633565
#endif

0 commit comments

Comments
 (0)