From: Yves Orton Date: Thu, 26 Oct 2006 12:34:43 +0000 (+0200) Subject: Fix a memory leak : X-Git-Tag: accepted/trunk/20130322.191538~16773 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ae0beba11d18ba5a4fa40f476873ab82ee11127b;p=platform%2Fupstream%2Fperl.git Fix a memory leak : Subject: Re: Valgrind findings Message-ID: <9b18b3110610260334t6b77c2dbu2ca8207d822402da@mail.gmail.com> p4raw-id: //depot/perl@29111 --- diff --git a/regexec.c b/regexec.c index c4d88cc..60ec4ff 100644 --- a/regexec.c +++ b/regexec.c @@ -3523,7 +3523,7 @@ S_regmatch(pTHX_ const regmatch_info *reginfo, regnode *prog) Newx(PL_reg_start_tmp, PL_reg_start_tmpl, char*); } - eval_recurse_doit: /* Share code with RECURSE below this line */ + eval_recurse_doit: /* Share code with RECURSE below this line */ /* run the pattern returned from (??{...}) */ ST.cp = regcppush(0); /* Save *all* the positions. */ REGCP_SET(ST.lastcp); @@ -3534,6 +3534,7 @@ S_regmatch(pTHX_ const regmatch_info *reginfo, regnode *prog) *PL_reglastparen = 0; *PL_reglastcloseparen = 0; PL_reginput = locinput; + PL_regsize = 0; /* XXXX This is too dramatic a measure... */ PL_reg_maxiter = 0;