Commit 43bd4db9 authored by Neal Norwitz's avatar Neal Norwitz

It's highly unlikely, though possible for PyEval_Get*() to return NULLs.

So be safe and do an XINCREF.

Klocwork # 221-222.
parent 84167d09
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment