diff Python/import.c @ 32293:6d7d00bf1aae 2.3

Fix a refcount bug in an obscure code corner.
author Thomas Heller <theller@ctypes.org>
date Mon, 07 Jun 2004 14:59:59 +0000
parents ec37cb1c0ed8
children a3d78d6bca51
line wrap: on
line diff
--- a/Python/import.c	Sun Jun 06 23:29:05 2004 +0000
+++ b/Python/import.c	Mon Jun 07 14:59:59 2004 +0000
@@ -943,6 +943,7 @@
 	if (fdp == NULL) {
 		if (PyErr_ExceptionMatches(PyExc_ImportError)) {
 			PyErr_Clear();
+			Py_INCREF(m);
 		}
 		else
 			m = NULL;