diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2006-08-12 01:46:42 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-08-12 01:46:42 (GMT) |
commit | 43bd4db933711da450931824add443549a757455 (patch) | |
tree | 20ab17361c698a10d1946c6514164d8a54125dde /Python/bltinmodule.c | |
parent | 84167d09cd3e97bff3e750d0dcb0d2d440c6fc2e (diff) | |
download | cpython-43bd4db933711da450931824add443549a757455.zip cpython-43bd4db933711da450931824add443549a757455.tar.gz cpython-43bd4db933711da450931824add443549a757455.tar.bz2 |
It's highly unlikely, though possible for PyEval_Get*() to return NULLs.
So be safe and do an XINCREF.
Klocwork # 221-222.
Diffstat (limited to 'Python/bltinmodule.c')
-rw-r--r-- | Python/bltinmodule.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 58dc7c9..5bae619 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; } |