projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6b78add
)
Re: [perl #15523] Memory Leak in split with trailing empty elements
author
Slaven Rezic
<slaven@rezic.de>
Wed, 31 Jul 2002 09:50:06 +0000
(11:50 +0200)
committer
hv
<hv@crypt.org>
Thu, 8 Aug 2002 14:44:21 +0000
(14:44 +0000)
Message-id: <87ado85ob5.fsf@vran.herceg.de>
p4raw-id: //depot/perl@17696
pp.c
patch
|
blob
|
history
diff --git
a/pp.c
b/pp.c
index
7fa9c06
..
d7fc6bf
100644
(file)
--- a/
pp.c
+++ b/
pp.c
@@
-4611,8
+4611,12
@@
PP(pp_split)
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) {