mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
* 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
This commit is contained in:
parent
995c33a2bb
commit
6f5afc9a73
4 changed files with 37 additions and 29 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue