From: Andrew M. Kuchling Date: Thu, 28 Sep 2006 17:08:01 +0000 (+0000) Subject: [Backport rev.39030 by nascheme] X-Git-Tag: v2.4.4c1~100 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6eb4283ec052ddd462315fefe1d469cc510bfbd9;p=thirdparty%2FPython%2Fcpython.git [Backport rev.39030 by nascheme] Add missing INCREF. --- diff --git a/Misc/NEWS b/Misc/NEWS index 2d5e60cfc972..036cf005a8a9 100644 --- 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 diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c index e30e22f068df..e8971b0d2b64 100644 --- a/Modules/gcmodule.c +++ b/Modules/gcmodule.c @@ -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