Skip to content

Commit

Permalink
* thread.c (do_select): fix memory leak.
Browse files Browse the repository at this point in the history
Patch by Eric Wong. Thank you! [Bug ruby#4953] [ruby-core:37702]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
kosaki committed Jul 1, 2011
1 parent 2e4fb84 commit c05fd75
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
@@ -1,3 +1,8 @@
Fri Jul 1 11:07:43 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>

* thread.c (do_select): fix memory leak.
Patch by Eric Wong. Thank you! [Bug #4953] [ruby-core:37702]

Fri Jul 1 08:21:28 2011 Koichi Sasada <ko1@atdot.net>

* vm_insnhelper.c (vm_getivar): check vm state version
Expand Down
8 changes: 8 additions & 0 deletions thread.c
Expand Up @@ -2620,6 +2620,14 @@ do_select(int n, rb_fdset_t *read, rb_fdset_t *write, rb_fdset_t *except,
break;
}
}

if (read)
rb_fd_term(&orig_read);
if (write)
rb_fd_term(&orig_write);
if (except)
rb_fd_term(&orig_except);

return result;
}

Expand Down

0 comments on commit c05fd75

Please sign in to comment.