From: Doug MacEachern Date: Wed, 11 Jul 2001 08:43:32 +0000 (-0700) Subject: [patch] perl_clone leaks X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=dc507217b3331807446df6e7f16977ee2fdc418e;p=p5sagit%2Fp5-mst-13.2.git [patch] perl_clone leaks Message-ID: p4raw-id: //depot/perl@11280 --- diff --git a/sv.c b/sv.c index da6bc2b..0f84074 100644 --- a/sv.c +++ b/sv.c @@ -10189,7 +10189,7 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags, 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; @@ -10197,6 +10197,9 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags, } } + SvREFCNT_dec(param->stashes); + Safefree(param); + #ifdef PERL_OBJECT return (PerlInterpreter*)pPerl; #else