diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2014-02-09 13:33:53 +0200 |
|---|---|---|
| committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-02-09 13:33:53 +0200 |
| commit | 505ff755d704c73ac613d3e8fed02c79c6ae555a (patch) | |
| tree | b9b0142cbeca125a1bcf0413e48d938d0cd390d3 /Modules/selectmodule.c | |
| parent | e9c31470e1680b7c9b9ee83c378b891e90ac58ab (diff) | |
| download | cpython-git-505ff755d704c73ac613d3e8fed02c79c6ae555a.tar.gz | |
Issue #20437: Fixed 21 potential bugs when deleting objects references.
Diffstat (limited to 'Modules/selectmodule.c')
| -rw-r--r-- | Modules/selectmodule.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c index c492224ecb..952a0919d4 100644 --- a/Modules/selectmodule.c +++ b/Modules/selectmodule.c @@ -74,8 +74,7 @@ reap_obj(pylist fd2obj[FD_SETSIZE + 1]) { int i; for (i = 0; i < FD_SETSIZE + 1 && fd2obj[i].sentinel >= 0; i++) { - Py_XDECREF(fd2obj[i].obj); - fd2obj[i].obj = NULL; + Py_CLEAR(fd2obj[i].obj); } fd2obj[0].sentinel = -1; } |
