From: Neal Norwitz Date: Sat, 12 Aug 2006 01:46:42 +0000 (+0000) Subject: It's highly unlikely, though possible for PyEval_Get*() to return NULLs. X-Git-Tag: v2.5c1~83 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=43bd4db933711da450931824add443549a757455;p=thirdparty%2FPython%2Fcpython.git It's highly unlikely, though possible for PyEval_Get*() to return NULLs. So be safe and do an XINCREF. Klocwork # 221-222. --- diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 58dc7c956b92..5bae619774e7 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -759,7 +759,7 @@ builtin_globals(PyObject *self) PyObject *d; d = PyEval_GetGlobals(); - Py_INCREF(d); + Py_XINCREF(d); return d; } @@ -1190,7 +1190,7 @@ builtin_locals(PyObject *self) PyObject *d; d = PyEval_GetLocals(); - Py_INCREF(d); + Py_XINCREF(d); return d; }