commit | 4adc9abc32a26f5ce5e2dada33d019f31170b5be | [log] [tgz] |
---|---|---|
author | Neal Norwitz <nnorwitz@gmail.com> | Mon Feb 10 03:10:43 2003 +0000 |
committer | Neal Norwitz <nnorwitz@gmail.com> | Mon Feb 10 03:10:43 2003 +0000 |
tree | 05932b4ee966256fc528a68b7d560723386db513 | |
parent | de8b94c3e1154eb7778a6d5729129b6a57c365fb [diff] |
Fix memory leak of newstr when putenv() fails
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 @@ new = PyString_AS_STRING(newstr); PyOS_snprintf(new, len, "%s=%s", s1, s2); if (putenv(new)) { + Py_DECREF(newstr); posix_error(); return NULL; }