Change 17696 by [EMAIL PROTECTED] on 2002/08/08 14:44:21
Subject: Re: [perl #15523] Memory Leak in split with trailing empty elements
From: Slaven Rezic <[EMAIL PROTECTED]>
Date: 31 Jul 2002 09:50:06 +0200
Message-id: <[EMAIL PROTECTED]>
Affected files ...
.... //depot/perl/pp.c#352 edit
Differences ...
==== //depot/perl/pp.c#352 (text) ====
Index: perl/pp.c
--- perl/pp.c#351~17255~ Sat Jun 15 20:29:09 2002
+++ perl/pp.c Thu Aug 8 07:44:21 2002
@@ -4611,8 +4611,12 @@
iters++;
}
else if (!origlimit) {
- while (iters > 0 && (!TOPs || !SvANY(TOPs) || SvCUR(TOPs) == 0))
- iters--, SP--;
+ while (iters > 0 && (!TOPs || !SvANY(TOPs) || SvCUR(TOPs) == 0)) {
+ if (TOPs && !make_mortal)
+ sv_2mortal(TOPs);
+ iters--;
+ SP--;
+ }
}
if (realarray) {
End of Patch.