Issue #3336 has been updated by HD Moore.
The patch below fixes this memory leak
Index: io.c
===================================================================
--- io.c (revision 27934)
+++ io.c (working copy)
@@ -7297,6 +7297,7 @@
rb_f_select(int argc, VALUE *argv, VALUE obj)
{
VALUE timeout;
+ VALUE r;
struct select_args args;
struct timeval timerec;
int i;
@@ -7316,8 +7317,12 @@
#ifdef HAVE_RB_FD_INIT
return rb_ensure(select_call, (VALUE)&args, select_end, (VALUE)&args);
#else
- return select_internal(args.read, args.write, args.except,
- args.timeout, args.fdsets);
+ r = select_internal(args.read, args.write, args.except, args.timeout, args.fdsets);
+
+ for (i = 0; i < numberof(args.fdsets); ++i)
+ rb_fd_term(&args.fdsets[i]);
+
+ return(r);
#endif
}
----------------------------------------
http://redmine.ruby-lang.org/issues/show/3336
----------------------------------------
http://redmine.ruby-lang.org