summaryrefslogtreecommitdiff
path: root/perly.c
diff options
context:
space:
mode:
authorGerard Goossen <gerard@ggoossen.net>2009-12-18 18:41:00 +0100
committerH.Merijn Brand <h.m.brand@xs4all.nl>2009-12-18 19:33:15 +0100
commit0e38ac7805aa91d94a5718273a06c051670207ca (patch)
tree15a8ae0c4baa484a45fc1c919548dcc9ca9a5d58 /perly.c
parent3d97da50423e4922873a8598cab029e60a40bfad (diff)
downloadperl-0e38ac7805aa91d94a5718273a06c051670207ca.tar.gz
When discarding a token free the op associated with it
When discarding a token free the op associated with it. Fixes memory leak in comp/parser.t Gerard Goossen From 7694ec023ec8856f34964b5eeea58f1b588c89bc Mon Sep 17 00:00:00 2001 From: Gerard Goossen <gerard@ggoossen.net> Date: Fri, 18 Dec 2009 18:32:11 +0100 Subject: [PATCH 4/4] When discarding a token free the op associated with it. Status: O Content-Length: 438 Lines: 20 Fixes memory leak in comp/parser.t Signed-off-by: H.Merijn Brand <h.m.brand@xs4all.nl>
Diffstat (limited to 'perly.c')
-rw-r--r--perly.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/perly.c b/perly.c
index 07093071e6..3624ca3c04 100644
--- a/perly.c
+++ b/perly.c
@@ -614,6 +614,8 @@ Perl_yyparse (pTHX)
}
YYDSYMPRINTF ("Error: discarding", yytoken, &parser->yylval);
+ if (yy_type_tab[yytoken] == toketype_opval)
+ op_free(parser->yylval.opval);
parser->yychar = YYEMPTY;
}