summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Misc/ACKS1
-rw-r--r--Modules/posixmodule.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/Misc/ACKS b/Misc/ACKS
index c68f9eb..b8ae14b 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -1590,6 +1590,7 @@ Andi Vajda
Case Van Horsen
John Mark Vandenberg
Kyle VanderBeek
+Eric N. Vander Weele
Andrew Vant
Atul Varma
Dmitry Vasiliev
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 0337890..bf82543 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -4823,6 +4823,8 @@ parse_envlist(PyObject* env, Py_ssize_t *envc_ptr)
PyUnicode_FindChar(key2, '=', 1, PyUnicode_GET_LENGTH(key2), 1) != -1)
{
PyErr_SetString(PyExc_ValueError, "illegal environment variable name");
+ Py_DECREF(key2);
+ Py_DECREF(val2);
goto error;
}
keyval = PyUnicode_FromFormat("%U=%U", key2, val2);
@@ -4837,6 +4839,8 @@ parse_envlist(PyObject* env, Py_ssize_t *envc_ptr)
strchr(PyBytes_AS_STRING(key2) + 1, '=') != NULL)
{
PyErr_SetString(PyExc_ValueError, "illegal environment variable name");
+ Py_DECREF(key2);
+ Py_DECREF(val2);
goto error;
}
keyval = PyBytes_FromFormat("%s=%s", PyBytes_AS_STRING(key2),