]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix a refcount bug in an obscure code corner.
authorThomas Heller <theller@ctypes.org>
Mon, 7 Jun 2004 14:59:59 +0000 (14:59 +0000)
committerThomas Heller <theller@ctypes.org>
Mon, 7 Jun 2004 14:59:59 +0000 (14:59 +0000)
Python/import.c

index 670e603e64c6cdcf37701d9111980a3666d86db5..11aa2b4571fd2d53b4781192d2b8040cc5d7fae0 100644 (file)
@@ -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;