From: Thomas Heller Date: Mon, 7 Jun 2004 15:04:10 +0000 (+0000) Subject: Fix a refcount bug in an obscure code corner. X-Git-Tag: v2.4a1~230 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=25653242fe7523b9b66ec836066908a74a49cda1;p=thirdparty%2FPython%2Fcpython.git Fix a refcount bug in an obscure code corner. Already backported. --- diff --git a/Python/import.c b/Python/import.c index 030142ad8f7e..d4c9e2e40ac1 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;