diff options
author | Guido van Rossum <guido@python.org> | 1993-02-05 09:46:15 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1993-02-05 09:46:15 (GMT) |
commit | 6f5afc9a73d7388bf96df69323589f2f82c110ba (patch) | |
tree | f642f4a5f0d1a136b4480575460662deb89d7502 /Modules/selectmodule.c | |
parent | 995c33a2bbb540729e3330ed8f11365e578ab5a0 (diff) | |
download | cpython-6f5afc9a73d7388bf96df69323589f2f82c110ba.zip cpython-6f5afc9a73d7388bf96df69323589f2f82c110ba.tar.gz cpython-6f5afc9a73d7388bf96df69323589f2f82c110ba.tar.bz2 |
* ceval.c: ifdef out the last argument passing compat hack.
* Fixed memory leaks in socket, select and sv modules: mkvalue("O", v)
does INCREF(v) so if v is brand new it should be XDECREF'd
Diffstat (limited to 'Modules/selectmodule.c')
-rw-r--r-- | Modules/selectmodule.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c index be2b062..99a9213 100644 --- a/Modules/selectmodule.c +++ b/Modules/selectmodule.c @@ -112,6 +112,7 @@ select_select(self, args) { object *fd2obj[FD_SETSIZE]; object *ifdlist, *ofdlist, *efdlist; + object *ret; fd_set ifdset, ofdset, efdset; double timeout; struct timeval tv, *tvp; @@ -168,8 +169,11 @@ select_select(self, args) ifdlist = set2list(&ifdset, imax, fd2obj); ofdlist = set2list(&ofdset, omax, fd2obj); efdlist = set2list(&efdset, emax, fd2obj); - - return mkvalue("OOO", ifdlist, ofdlist, efdlist); + ret = mkvalue("OOO", ifdlist, ofdlist, efdlist); + XDECREF(ifdlist); + XDECREF(ofdlist); + XDECREF(efdlist); + return ret; } |