summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2006-10-05 19:01:50 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2006-10-05 19:01:50 (GMT)
commit720ea077880294a142e8e0f182b12af0335069e4 (patch)
treede33eb5369c8b29d54f0fa4d0c05fabc556f9f6e /Python
parente67841f113f40327561641ca33945490ceeb3a8a (diff)
downloadcpython-720ea077880294a142e8e0f182b12af0335069e4.zip
cpython-720ea077880294a142e8e0f182b12af0335069e4.tar.gz
cpython-720ea077880294a142e8e0f182b12af0335069e4.tar.bz2
[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.
Diffstat (limited to 'Python')
-rw-r--r--Python/bltinmodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index bf61640..3ae38f3 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;
}