From: Karl Date: Mon, 26 Jan 2009 02:02:13 +0000 (-0700) Subject: Fix memory leak X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b3a04dd304972047fb13ae81948fa8b870cd855a;p=p5sagit%2Fp5-mst-13.2.git Fix memory leak --- diff --git a/regexec.c b/regexec.c index bc8da6e..45ece8e 100644 --- a/regexec.c +++ b/regexec.c @@ -5807,6 +5807,9 @@ S_reginclass(pTHX_ const regexp *prog, register const regnode *n, register const match = TRUE; } } + + /* If we allocated a string above, free it */ + if (! do_utf8) Safefree(utf8_p); } } if (match && lenp && *lenp == 0)