diff options
author | Dylan William Hardison <dylan@hardison.net> | 2015-08-01 01:59:00 +0200 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2015-08-01 01:59:00 +0200 |
commit | d7208303b8e0d025490f338241b2abb24dc5f1f4 (patch) | |
tree | c8fa6c3ff0da1e03144b47bd7b850c91de8f9297 | |
parent | 3cd9430a0de3f9a4c066688ef6972b323aff6bea (diff) | |
download | bugzilla-d7208303b8e0d025490f338241b2abb24dc5f1f4.tar.gz bugzilla-d7208303b8e0d025490f338241b2abb24dc5f1f4.tar.xz |
Bug 1189362 - Fix memory leak in Bugzilla::Bug->comments
-rw-r--r-- | Bugzilla/Bug.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 256784022..389747011 100644 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -57,7 +57,7 @@ use List::Util qw(min max first); use Storable qw(dclone); use URI; use URI::QueryParam; -use Scalar::Util qw(blessed); +use Scalar::Util qw(blessed weaken); use base qw(Bugzilla::Object Exporter); @Bugzilla::Bug::EXPORT = qw( @@ -3628,6 +3628,7 @@ sub comments { foreach my $comment (@{ $self->{'comments'} }) { $comment->{count} = $count++; $comment->{bug} = $self; + weaken($comment->{bug}); } # Some bugs may have no comments when upgrading old installations. Bugzilla::Comment->preload($self->{'comments'}) if @{ $self->{'comments'} }; |