summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
authorAdrian M. Enache <enache@rdslink.ro>2003-12-11 23:04:03 +0000
committerEnache Adrian <enache@rdslink.ro>2003-12-11 23:04:03 +0000
commit979acdb57942c7eba962592584b8668e204b0c71 (patch)
tree99449beaf9d8e825baf38c2b22033a13af7857da /mg.c
parent8f78557a961555c7d3a0f903d990f4f78b07624a (diff)
downloadperl-979acdb57942c7eba962592584b8668e204b0c71.tar.gz
#21866 was wrong. another try to plumb that damn leak.
p4raw-id: //depot/perl@21876
Diffstat (limited to 'mg.c')
-rw-r--r--mg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mg.c b/mg.c
index 7955e52003..4ef7910bd6 100644
--- a/mg.c
+++ b/mg.c
@@ -384,7 +384,7 @@ Perl_mg_free(pTHX_ SV *sv)
if (vtbl && vtbl->svt_free)
CALL_FPTR(vtbl->svt_free)(aTHX_ sv, mg);
if (mg->mg_ptr && mg->mg_type != PERL_MAGIC_regex_global) {
- if (mg->mg_len > 0)
+ if (mg->mg_len > 0 || mg->mg_type == PERL_MAGIC_utf8)
Safefree(mg->mg_ptr);
else if (mg->mg_len == HEf_SVKEY)
SvREFCNT_dec((SV*)mg->mg_ptr);