Commit b0314278 authored by Victor Stinner's avatar Victor Stinner

Issue #19437: Fix parse_envlist() of the posix/nt module, don't call

PyMapping_Values() with an exception set, exit immediatly on error.
parent b80b3786
......@@ -5083,8 +5083,10 @@ parse_envlist(PyObject* env, Py_ssize_t *envc_ptr)
}
envc = 0;
keys = PyMapping_Keys(env);
if (!keys)
goto error;
vals = PyMapping_Values(env);
if (!keys || !vals)
if (!vals)
goto error;
if (!PyList_Check(keys) || !PyList_Check(vals)) {
PyErr_Format(PyExc_TypeError,
......
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