summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Heller <theller@ctypes.org>2004-06-07 15:04:10 (GMT)
committerThomas Heller <theller@ctypes.org>2004-06-07 15:04:10 (GMT)
commit25653242fe7523b9b66ec836066908a74a49cda1 (patch)
tree9cc818c25ae618fed045c89261510102eebab18f
parent1c0228a51902233b3478e835be65198d305824e4 (diff)
downloadcpython-25653242fe7523b9b66ec836066908a74a49cda1.zip
cpython-25653242fe7523b9b66ec836066908a74a49cda1.tar.gz
cpython-25653242fe7523b9b66ec836066908a74a49cda1.tar.bz2
Fix a refcount bug in an obscure code corner.
Already backported.
-rw-r--r--Python/import.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/import.c b/Python/import.c
index 030142a..d4c9e2e 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -921,6 +921,7 @@ load_package(char *name, char *pathname)
if (fdp == NULL) {
if (PyErr_ExceptionMatches(PyExc_ImportError)) {
PyErr_Clear();
+ Py_INCREF(m);
}
else
m = NULL;