This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Plug a memory leak in Encode
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Tue, 29 May 2007 15:48:27 +0000 (15:48 +0000)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Tue, 29 May 2007 15:48:27 +0000 (15:48 +0000)
p4raw-id: //depot/perl@31307

ext/Encode/Encode.xs

index c86ce82..265aec0 100644 (file)
@@ -87,6 +87,7 @@ do_fallback_cb(pTHX_ UV ch)
     LEAVE;
     retval = newSVpv("",0);
     sv_catsv(retval, temp);
     LEAVE;
     retval = newSVpv("",0);
     sv_catsv(retval, temp);
+    SvREFCNT_dec(temp);
     return retval;
 }
 
     return retval;
 }