This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix SV leak in Perl_emulate_cop_io(), present since 8b850bd54aa90bd3.
authorNicholas Clark <nick@ccl4.org>
Sun, 24 Oct 2010 16:23:17 +0000 (17:23 +0100)
committerNicholas Clark <nick@ccl4.org>
Sun, 24 Oct 2010 16:24:14 +0000 (17:24 +0100)
ext/B/B.xs

index 38f0a05..6cd3d60 100644 (file)
@@ -320,7 +320,7 @@ make_cop_io_object(pTHX_ COP *cop)
     Perl_emulate_cop_io(aTHX_ cop, value);
 
     if(SvOK(value)) {
-       return make_temp_object(aTHX_ newSVsv(value));
+       return make_sv_object(aTHX_ NULL, value);
     } else {
        SvREFCNT_dec(value);
        return make_sv_object(aTHX_ NULL, NULL);