bpo-38532: Add missing decrefs in PyCFuncPtr_FromDll() (GH-16857)

This commit is contained in:
Zackery Spytz 2020-01-03 05:16:12 -07:00 committed by T. Wouters
parent b789202cbe
commit e02ab59fdf
1 changed files with 2 additions and 0 deletions

View File

@ -3554,10 +3554,12 @@ PyCFuncPtr_FromDll(PyTypeObject *type, PyObject *args, PyObject *kwds)
if (PySys_Audit("ctypes.dlsym",
((uintptr_t)name & ~0xFFFF) ? "Os" : "On",
dll, name) < 0) {
Py_DECREF(ftuple);
return NULL;
}
#else
if (PySys_Audit("ctypes.dlsym", "Os", dll, name) < 0) {
Py_DECREF(ftuple);
return NULL;
}
#endif