From: Dave Mitchell Date: Mon, 28 Jun 2004 22:50:01 +0000 (+0000) Subject: [perl #30509] use encoding and "eq" cause memory leak X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0a1bd7acb04f7cfb7bc0973e9fa8f84b971137e7;p=p5sagit%2Fp5-mst-13.2.git [perl #30509] use encoding and "eq" cause memory leak Perl_sv_eq() was creating a temp and not always freeing it p4raw-id: //depot/perl@23006 --- diff --git a/sv.c b/sv.c index 371d17e..db872e1 100644 --- a/sv.c +++ b/sv.c @@ -6639,8 +6639,10 @@ Perl_sv_eq(pTHX_ register SV *sv1, register SV *sv2) pv1 = SvPV(svrecode, cur1); } /* Now both are in UTF-8. */ - if (cur1 != cur2) + if (cur1 != cur2) { + SvREFCNT_dec(svrecode); return FALSE; + } } else { bool is_utf8 = TRUE;