summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/posixmodule.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 2da5d41..9dea4b5 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -5662,6 +5662,7 @@ posix_putenv(PyObject *self, PyObject *args)
new = PyString_AS_STRING(newstr);
PyOS_snprintf(new, len, "%s=%s", s1, s2);
if (putenv(new)) {
+ Py_DECREF(newstr);
posix_error();
return NULL;
}