From 720ea077880294a142e8e0f182b12af0335069e4 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Thu, 5 Oct 2006 19:01:50 +0000 Subject: [PATCH] [Backport r51220 | neal.norwitz] It's highly unlikely, though possible for PyEval_Get*() to return NULLs. So be safe and do an XINCREF. Klocwork # 221-222. --- Python/bltinmodule.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index bf61640b30ba..3ae38f3cec95 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -687,7 +687,7 @@ builtin_globals(PyObject *self) PyObject *d; d = PyEval_GetGlobals(); - Py_INCREF(d); + Py_XINCREF(d); return d; } @@ -1118,7 +1118,7 @@ builtin_locals(PyObject *self) PyObject *d; d = PyEval_GetLocals(); - Py_INCREF(d); + Py_XINCREF(d); return d; } -- 2.47.3