diff Python/import.c @ 76358:feeb1ca9e93c

Fix reference loss on Py_None when None is encountered in sys.modules.
author Antoine Pitrou <solipsis@pitrou.net>
date Mon, 16 Apr 2012 18:48:49 +0200
parents 4256df44023b
children a3e9d5c239c4
line wrap: on
line diff
--- a/Python/import.c	Mon Apr 16 18:30:54 2012 +0200
+++ b/Python/import.c	Mon Apr 16 18:48:49 2012 +0200
@@ -2827,6 +2827,7 @@
         if (msg != NULL) {
             PyErr_SetFromImportErrorWithName(msg, abs_name);
         }
+        mod = NULL;
         goto error_with_unlock;
     }
     else if (mod != NULL) {