]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[Backport rev.39030 by nascheme]
authorAndrew M. Kuchling <amk@amk.ca>
Thu, 28 Sep 2006 17:08:01 +0000 (17:08 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Thu, 28 Sep 2006 17:08:01 +0000 (17:08 +0000)
Add missing INCREF.

Misc/NEWS
Modules/gcmodule.c

index 2d5e60cfc9728680904bb5d9a39ef4ba968f53c6..036cf005a8a97663ec2a31e3d2511bac1a4ab7a6 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -54,6 +54,8 @@ Core and builtins
 Extension Modules
 -----------------
 
+- gcmodule: add a missing incref.
+
 - threadmodule: add a missing incref.
 
 - Bug #1551427: fix a wrong NULL pointer check in the win32 version
index e30e22f068df36f57f8019ea0475b748bcd69cf7..e8971b0d2b646693a77e7ca7e9f12642183eec53 100644 (file)
@@ -1169,6 +1169,7 @@ initgc(void)
                if (garbage == NULL)
                        return;
        }
+       Py_INCREF(garbage);
        if (PyModule_AddObject(m, "garbage", garbage) < 0)
                return;
 #define ADD_INT(NAME) if (PyModule_AddIntConstant(m, #NAME, NAME) < 0) return