perl-unicode

Re: Another Unicode s/// buglet?

2002-06-26 10:30:05
Mopping up.

Change 17362 by jhi(_at_)alpha on 2002/06/26 15:25:45

        Let's not leak.

Affected files ...

.... //depot/perl/pp_hot.c#283 edit

Differences ...

==== //depot/perl/pp_hot.c#283 (text) ====
Index: perl/pp_hot.c
--- perl/pp_hot.c#282~17358~    Wed Jun 26 17:37:12 2002
+++ perl/pp_hot.c       Wed Jun 26 18:25:45 2002
@@ -1987,7 +1987,7 @@
        doutf8 = DO_UTF8(dstr);
        /* replacement needing upgrading? */
        if (DO_UTF8(TARG) && !doutf8) {
-            SV *nsv = newSVpvn(c, clen);
+            SV *nsv = sv_2mortal(newSVpvn(c, clen));
             if (PL_encoding)
                  sv_recode_to_utf8(nsv, PL_encoding);
             else
End of Patch.


-- 
$jhi++; # http://www.iki.fi/jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen

<Prev in Thread] Current Thread [Next in Thread>