commit | 43bd4db933711da450931824add443549a757455 | [log] [tgz] |
---|---|---|
author | Neal Norwitz <nnorwitz@gmail.com> | Sat Aug 12 01:46:42 2006 +0000 |
committer | Neal Norwitz <nnorwitz@gmail.com> | Sat Aug 12 01:46:42 2006 +0000 |
tree | 20ab17361c698a10d1946c6514164d8a54125dde | |
parent | 84167d09cd3e97bff3e750d0dcb0d2d440c6fc2e [diff] [blame] |
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 58dc7c9..5bae619 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c
@@ -759,7 +759,7 @@ PyObject *d; d = PyEval_GetGlobals(); - Py_INCREF(d); + Py_XINCREF(d); return d; } @@ -1190,7 +1190,7 @@ PyObject *d; d = PyEval_GetLocals(); - Py_INCREF(d); + Py_XINCREF(d); return d; }