From 2a4f803ae2c2b6de1c29a5c91efdcd59411303dc Mon Sep 17 00:00:00 2001 From: "Adrian M. Enache" Date: Mon, 8 Dec 2003 03:34:37 +0000 Subject: [PATCH] yet another 2 leaks. example for the second: #! perl eval q{ open $p{q}, "foo" } while 1 __END__ p4raw-id: //depot/perl@21867 --- op.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } } -- 2.7.4