1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
From 5cd3a5b21bd00dbb2e54e58fec6b0349bf457bb0 Mon Sep 17 00:00:00 2001
From: Konrad Bucheli <kb@open.ch>
Date: Tue, 27 Mar 2018 11:22:58 +0200
Subject: [PATCH] Another Bugfix for memory leak [rt.cpan.org #57990] #86
Origin: https://github.com/kbucheli/IPC-Run/commit/d706e65d0e5dab055d9b6c8d070330fdc7b1a883
Bug: https://github.com/toddr/IPC-Run/issues/86
---
lib/IPC/Run.pm | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lib/IPC/Run.pm b/lib/IPC/Run.pm
index 2436bc5..61cdb5f 100644
--- a/lib/IPC/Run.pm
+++ b/lib/IPC/Run.pm
@@ -1135,6 +1135,12 @@ sub DESTROY {
my IPC::Run $self = shift;
POSIX::close $self->{DEBUG_FD} if defined $self->{DEBUG_FD};
$self->{DEBUG_FD} = undef;
+
+ for my $kid ( @{$self->{KIDS}} ) {
+ for my $op ( @{$kid->{OPS}} ) {
+ delete $op->{FILTERS};
+ }
+ }
}
##
--
2.17.0
|