mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
plug refleak
This commit is contained in:
parent
116d6b98bf
commit
4bb867d3ec
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue