develooper Front page | perl.perl5.porters | Postings from July 2001

[patch] perl_clone leaks

From:
Doug MacEachern
Date:
July 11, 2001 08:42
Subject:
[patch] perl_clone leaks
Message ID:
Pine.LNX.4.21.0107110842390.11688-100000@mako.covalent.net
there more leakage than this, but these were easy to spot..

--- sv.c        2001/07/11 15:26:29     1.1.1.62
+++ sv.c        2001/07/11 15:38:19
@@ -10189,13 +10189,16 @@
            ENTER;
            SAVETMPS;
            PUSHMARK(SP);
-           XPUSHs(newSVpv(HvNAME(stash), 0));
+           XPUSHs(sv_2mortal(newSVpv(HvNAME(stash), 0)));
            PUTBACK;
            call_sv((SV*)GvCV(cloner), G_DISCARD);
            FREETMPS;
            LEAVE;
        }
     }
+
+    SvREFCNT_dec(param->stashes);
+    Safefree(param);
 
 #ifdef PERL_OBJECT
     return (PerlInterpreter*)pPerl;





nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About