summaryrefslogtreecommitdiff
path: root/perly.c
diff options
context:
space:
mode:
authorIlya Zakharevich <ilya@math.berkeley.edu>1998-01-09 12:55:09 -0500
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>1998-02-06 15:53:53 +0000
commit8c52afecd5252bed5ed8df3a63a6cd9affde4ab4 (patch)
treebf76561b68d175b89a738902a9cce82ceb3cb23c /perly.c
parentcdaebead333273a920fe10cbcb2213a9fbefa241 (diff)
downloadperl-8c52afecd5252bed5ed8df3a63a6cd9affde4ab4.tar.gz
Newer -DLEAKTEST patch
p4raw-id: //depot/perl@466
Diffstat (limited to 'perly.c')
-rw-r--r--perly.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/perly.c b/perly.c
index bd6bf8424a..063515ee03 100644
--- a/perly.c
+++ b/perly.c
@@ -1334,7 +1334,9 @@ yyparse(void)
#endif
#endif
- struct ysv *ysave = (struct ysv*)safemalloc(sizeof(struct ysv));
+ struct ysv *ysave;
+
+ New(73, ysave, 1, struct ysv);
SAVEDESTRUCTOR(yydestruct, ysave);
ysave->oldyydebug = yydebug;
ysave->oldyynerrs = yynerrs;
@@ -1359,8 +1361,10 @@ yyparse(void)
/*
** Initialize private stacks (yyparse may be called from an action)
*/
- ysave->yyss = yyss = (short*)safemalloc(yystacksize*sizeof(short));
- ysave->yyvs = yyvs = (YYSTYPE*)safemalloc(yystacksize*sizeof(YYSTYPE));
+ New(73, yyss, yystacksize, short);
+ New(73, yyvs, yystacksize, YYSTYPE);
+ ysave->yyss = yyss;
+ ysave->yyvs = yyvs;
if (!yyvs || !yyss)
goto yyoverflow;