From c91fb6fc7aabca27bf8d4d6c739819dd448d5689 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Thu, 28 Sep 2006 17:05:18 +0000 Subject: [PATCH] [Backport rev. 39012 by mwh] Add a missing incref. --- Misc/NEWS | 2 ++ Modules/threadmodule.c | 1 + 2 files changed, 3 insertions(+) diff --git a/Misc/NEWS b/Misc/NEWS index 28bc76a973e5..2d5e60cfc972 100644 --- 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(). diff --git a/Modules/threadmodule.c b/Modules/threadmodule.c index 831da13c53f0..000a1151900e 100644 --- a/Modules/threadmodule.c +++ b/Modules/threadmodule.c @@ -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; -- 2.47.3