Skip to content

Commit

Permalink
bpo-38532: Add missing decrefs in PyCFuncPtr_FromDll() (pythonGH-16857)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZackerySpytz authored and Yhg1s committed Jan 3, 2020
1 parent b789202 commit e02ab59
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Modules/_ctypes/_ctypes.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e02ab59

Please sign in to comment.