mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
bpo-38532: Add missing decrefs in PyCFuncPtr_FromDll() (GH-16857)
This commit is contained in:
parent
b789202cbe
commit
e02ab59fdf
1 changed files with 2 additions and 0 deletions
|
@ -3554,10 +3554,12 @@ PyCFuncPtr_FromDll(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
if (PySys_Audit("ctypes.dlsym",
|
if (PySys_Audit("ctypes.dlsym",
|
||||||
((uintptr_t)name & ~0xFFFF) ? "Os" : "On",
|
((uintptr_t)name & ~0xFFFF) ? "Os" : "On",
|
||||||
dll, name) < 0) {
|
dll, name) < 0) {
|
||||||
|
Py_DECREF(ftuple);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if (PySys_Audit("ctypes.dlsym", "Os", dll, name) < 0) {
|
if (PySys_Audit("ctypes.dlsym", "Os", dll, name) < 0) {
|
||||||
|
Py_DECREF(ftuple);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue