From: Adrian M. Enache Date: Mon, 8 Dec 2003 03:34:37 +0000 (+0000) Subject: yet another 2 leaks. example for the second: X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2a4f803ae2c2b6de1c29a5c91efdcd59411303dc;p=p5sagit%2Fp5-mst-13.2.git yet another 2 leaks. example for the second: #! perl eval q{ open $p{q}, "foo" } while 1 __END__ p4raw-id: //depot/perl@21867 --- diff --git a/op.c b/op.c index 5823974..020f463 100644 --- a/op.c +++ b/op.c @@ -1823,6 +1823,7 @@ Perl_newPROG(pTHX_ OP *o) if (o->op_type == OP_STUB) { PL_comppad_name = 0; PL_compcv = 0; + FreeOp(o); return; } PL_main_root = scope(sawparens(scalarvoid(o))); @@ -5235,8 +5236,7 @@ Perl_ck_fun(pTHX_ OP *o) } if (tmpstr) { - name = savepv(SvPVX(tmpstr)); - len = strlen(name); + name = SvPV(tmpstr, len); sv_2mortal(tmpstr); } }