Skip to content

Commit 11cc289

Browse files
authored
Fix missing DECREF of mod. (#4749)
1 parent dd431b3 commit 11cc289

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
@@ -1735,6 +1735,7 @@ PyImport_ImportModuleLevelObject(PyObject *name, PyObject *globals,
17351735
}
17361736
}
17371737
else {
1738+
Py_XDECREF(mod);
17381739
mod = import_find_and_load(abs_name);
17391740
if (mod == NULL) {
17401741
goto error;

0 commit comments

Comments
 (0)