summaryrefslogtreecommitdiff
path: root/Python/import.c
diff options
context:
space:
mode:
authorThomas Heller <theller@ctypes.org>2004-06-07 14:59:59 +0000
committerThomas Heller <theller@ctypes.org>2004-06-07 14:59:59 +0000
commita67ea98b99d1d5e97be6d6d886d2ae23c3f0c085 (patch)
treecedab04b85f250cac28421c947bf681120bd92ac /Python/import.c
parent67c5b5edf4867ba867c7d4592c72647b9e32a35a (diff)
downloadcpython-git-a67ea98b99d1d5e97be6d6d886d2ae23c3f0c085.tar.gz
Fix a refcount bug in an obscure code corner.
Diffstat (limited to 'Python/import.c')
-rw-r--r--Python/import.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/import.c b/Python/import.c
index 670e603e64..11aa2b4571 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -943,6 +943,7 @@ load_package(char *name, char *pathname)
if (fdp == NULL) {
if (PyErr_ExceptionMatches(PyExc_ImportError)) {
PyErr_Clear();
+ Py_INCREF(m);
}
else
m = NULL;