Issue #15578: Correctly incref the parent module while importing.
diff --git a/Python/import.c b/Python/import.c
index 96f7d47..af47b0b 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -2243,8 +2243,10 @@
     if (parent == NULL)
         goto error_exit;
 
+    Py_INCREF(parent);
     head = load_next(parent, level < 0 ? Py_None : parent, &name, buf,
                         &buflen);
+    Py_DECREF(parent);
     if (head == NULL)
         goto error_exit;