[Python-checkins] cpython (merge 3.2 -> default): merge 3.2
benjamin.peterson
python-checkins at python.org
Wed Nov 23 06:17:13 CET 2011
http://hg.python.org/cpython/rev/f775e6d08410
changeset: 73717:f775e6d08410
parent: 73715:1b8db8aa5589
parent: 73716:714b76882eb8
user: Benjamin Peterson <benjamin at python.org>
date: Tue Nov 22 23:14:47 2011 -0600
summary:
merge 3.2
files:
Modules/posixmodule.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -7844,12 +7844,16 @@
int err;
if (!PyArg_ParseTuple(args, "O&:unsetenv",
+
PyUnicode_FSConverter, &name))
return NULL;
+
err = unsetenv(PyBytes_AS_STRING(name));
- if (err)
- return posix_error();
+ if (err) {
+ Py_DECREF(name);
+ return posix_error();
+ }
/* Remove the key from posix_putenv_garbage;
* this will cause it to be collected. This has to
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list