summaryrefslogtreecommitdiff
path: root/perly.y
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-12-20 11:15:29 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-12-20 11:15:29 +0000
commit63031dafabc5d083e95e183670b541c828379c76 (patch)
tree97ed783b9091b2b1b8391d5aec301b4237f85cd7 /perly.y
parent7bf061987421c117ea5f8db9475ff899f75b9098 (diff)
downloadperl-63031dafabc5d083e95e183670b541c828379c76.tar.gz
Fix leaks in label strings allocation in COPs
p4raw-id: //depot/perl@29601
Diffstat (limited to 'perly.y')
-rw-r--r--perly.y6
1 files changed, 2 insertions, 4 deletions
diff --git a/perly.y b/perly.y
index e4515da2a2..a1f23ab7ce 100644
--- a/perly.y
+++ b/perly.y
@@ -390,8 +390,7 @@ loop : label WHILE '(' remember texpr ')' mintro mblock cont
#ifdef MAD
forop = newUNOP(OP_NULL, 0, append_elem(OP_LINESEQ,
newSTATEOP(0,
- (($1)->tk_lval.pval
- ?savepv(($1)->tk_lval.pval):Nullch),
+ CopLABEL_alloc(($1)->tk_lval.pval),
($5 ? newOP(OP_NULL, 0) : $5) ),
forop));
@@ -404,8 +403,7 @@ loop : label WHILE '(' remember texpr ')' mintro mblock cont
#else
if ($5) {
forop = append_elem(OP_LINESEQ,
- newSTATEOP(0, ($1?savepv($1):Nullch),
- $5),
+ newSTATEOP(0, CopLABEL_alloc($1), $5),
forop);
}