Skip to content

Commit d8d01e1

Browse files
Decref ob in make_funcptrtype_dict
1 parent 8ff32f7 commit d8d01e1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Modules/_ctypes/_ctypes.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2676,6 +2676,7 @@ make_funcptrtype_dict(ctypes_state *st, PyObject *attrdict, StgInfo *stginfo)
26762676
if (ob) {
26772677
StgInfo *info;
26782678
if (PyStgInfo_FromType(st, ob, &info) < 0) {
2679+
Py_DECREF(ob);
26792680
return -1;
26802681
}
26812682
if (ob != Py_None && !info && !PyCallable_Check(ob)) {

0 commit comments

Comments
 (0)