This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
remove leak in tr/ascii/utf8/
[perl5.git] / doop.c
diff --git a/doop.c b/doop.c
index 6db986b..3e62c8c 100644 (file)
--- a/doop.c
+++ b/doop.c
@@ -523,6 +523,7 @@ S_do_trans_invmap(pTHX_ SV * const sv, AV * const invmap)
     s += s_len;
     if (! inplace) {
        sv_setpvn(sv, (char*)d0, d - d0);
+        Safefree(d0);
     }
     else {
        *d = '\0';