From: Gerard Goossen Date: Fri, 18 Dec 2009 17:41:00 +0000 (+0100) Subject: When discarding a token free the op associated with it X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0e38ac7805aa91d94a5718273a06c051670207ca;p=p5sagit%2Fp5-mst-13.2.git 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 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 --- diff --git a/perly.c b/perly.c index 0709307..3624ca3 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; }