summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorDave Mitchell <davem@fdisolutions.com>2004-06-28 22:50:01 +0000
committerDave Mitchell <davem@fdisolutions.com>2004-06-28 22:50:01 +0000
commit0a1bd7acb04f7cfb7bc0973e9fa8f84b971137e7 (patch)
tree107322430285cb201fa006485d10809cfffd860e /sv.c
parent356373a2d8b3989a5bd4c75cba13144296e37c1d (diff)
downloadperl-0a1bd7acb04f7cfb7bc0973e9fa8f84b971137e7.tar.gz
[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
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sv.c b/sv.c
index 371d17e44c..db872e1d27 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;