Skip to content

Commit 2f9285f

Browse files
Update Modules/_ctypes/_ctypes.c
Co-authored-by: neonene <[email protected]>
1 parent 758045f commit 2f9285f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/_ctypes/_ctypes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,8 +489,8 @@ ctype_clear_stginfo(StgInfo *info)
489489
Py_CLEAR(info->converters);
490490
Py_CLEAR(info->restype);
491491
Py_CLEAR(info->checker);
492-
Py_CLEAR(info->module);
493492
Py_CLEAR(info->pointer_type);
493+
Py_CLEAR(info->module); // decref the module last
494494
}
495495

496496
static int

0 commit comments

Comments
 (0)