Skip to content

Commit f0afe77

Browse files
committed
Issue #27909: Fix INCREF for possible NULL value
1 parent 74eda76 commit f0afe77

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/import.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1056,7 +1056,7 @@ _imp_create_builtin(PyObject *module, PyObject *spec)
10561056
mod = _PyImport_FindExtensionObject(name, name);
10571057
if (mod || PyErr_Occurred()) {
10581058
Py_DECREF(name);
1059-
Py_INCREF(mod);
1059+
Py_XINCREF(mod);
10601060
return mod;
10611061
}
10621062

0 commit comments

Comments
 (0)