Skip to content

Commit 981dbd2

Browse files
Add a reference while cleaning up.
1 parent bcc72a5 commit 981dbd2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Python/import.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,7 @@ PyImport_Cleanup(void)
424424

425425
if (modules == NULL)
426426
return; /* Already done */
427+
Py_INCREF(modules);
427428

428429
/* Delete some special variables first. These are common
429430
places where user values hide and people complain when their

0 commit comments

Comments
 (0)