* 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
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 @@
{
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 @@
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;
}