mirror of https://github.com/python/cpython
plug refleak
This commit is contained in:
parent
aa1c967f93
commit
fde82169e1
|
@ -7050,8 +7050,10 @@ posix_unsetenv(PyObject *self, PyObject *args)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
err = unsetenv(s1);
|
err = unsetenv(s1);
|
||||||
if (err)
|
if (err) {
|
||||||
|
Py_DECREF(s1);
|
||||||
return posix_error();
|
return posix_error();
|
||||||
|
}
|
||||||
|
|
||||||
/* Remove the key from posix_putenv_garbage;
|
/* Remove the key from posix_putenv_garbage;
|
||||||
* this will cause it to be collected. This has to
|
* this will cause it to be collected. This has to
|
||||||
|
|
Loading…
Reference in New Issue