Skip to content

Commit

Permalink
fixed small memory leak in Mojo::IOLoop::Stream
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Dec 19, 2011
1 parent fb56c7b commit 5fcc030
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Changes
@@ -1,9 +1,10 @@
This file documents the revision history for Perl extension Mojolicious.

2.39 2011-12-19 00:00:00
2.39 2011-12-20 00:00:00
- Added EXPERIMENTAL close method to Mojo::IOLoop::Stream.
- Improved documentation. (marcus, vervain, sri)
- Fixed small argument bug in client method of Mojo::IOLoop.
- Fixed small memory leak in Mojo::IOLoop::Stream.

2.38 2011-12-17 00:00:00
- Changed Mojo::IOLoop->client arguments from ($loop, $stream, $err)
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojo/IOLoop/Stream.pm
Expand Up @@ -25,10 +25,10 @@ sub close {
my $self = shift;

# Cleanup
return unless my $handle = delete $self->{handle};
return unless my $watcher = $self->{iowatcher};
$watcher->drop_handle($handle);
$watcher->drop_timer(delete $self->{timer}) if $self->{timer};
return unless my $handle = delete $self->{handle};
$watcher->drop_handle($handle);

# Close
close $handle;
Expand Down

0 comments on commit 5fcc030

Please sign in to comment.