]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[Backport rev. 39012 by mwh]
authorAndrew M. Kuchling <amk@amk.ca>
Thu, 28 Sep 2006 17:05:18 +0000 (17:05 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Thu, 28 Sep 2006 17:05:18 +0000 (17:05 +0000)
Add a missing incref.

Misc/NEWS
Modules/threadmodule.c

index 28bc76a973e5268fec4c52619019666950a43d7f..2d5e60cfc9728680904bb5d9a39ef4ba968f53c6 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -54,6 +54,8 @@ Core and builtins
 Extension Modules
 -----------------
 
+- threadmodule: add a missing incref.
+
 - Bug #1551427: fix a wrong NULL pointer check in the win32 version
   of os.urandom().
 
index 831da13c53f00e81cd5c1cf40c0119994608b46b..000a1151900e261f841347e2ff1ff63407dbe4cf 100644 (file)
@@ -661,6 +661,7 @@ initthread(void)
        Py_INCREF(&Locktype);
        PyDict_SetItemString(d, "LockType", (PyObject *)&Locktype);
 
+       Py_INCREF(&localtype);
         if (PyModule_AddObject(m, "_local", (PyObject *)&localtype) < 0)
                return;