diff options
author | Benjamin Peterson <benjamin@python.org> | 2011-11-23 05:12:49 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2011-11-23 05:12:49 (GMT) |
commit | 4bb867d3ec4f004dc35daf9ae935dc72c5214789 (patch) | |
tree | 4a3608eb6973e81ebd821c0bf661cc8ffeffdae5 | |
parent | 116d6b98bf9c09760269db093f3251a16b6c1e81 (diff) | |
download | cpython-4bb867d3ec4f004dc35daf9ae935dc72c5214789.zip cpython-4bb867d3ec4f004dc35daf9ae935dc72c5214789.tar.gz cpython-4bb867d3ec4f004dc35daf9ae935dc72c5214789.tar.bz2 |
plug refleak
-rw-r--r-- | Modules/posixmodule.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 7286445..2afd5a6 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -6193,8 +6193,10 @@ posix_unsetenv(PyObject *self, PyObject *args) s1 = PyBytes_AsString(os1); err = unsetenv(s1); - if (err) + if (err) { + Py_DECREF(s1); return posix_error(); + } /* Remove the key from posix_putenv_garbage; * this will cause it to be collected. This has to |