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: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=25653242fe7523b9b66ec836066908a74a49cda1;p=python Fix a refcount bug in an obscure code corner. Already backported. --- diff --git a/Python/import.c b/Python/import.c index 030142ad8f..d4c9e2e40a 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;