glob-in-eval memory leak fix
Charles Lane [Wed, 21 Feb 2001 13:08:03 +0000 (08:08 -0500)]
Message-Id: <010221130721.7a2ab@DUPHY4.Physics.Drexel.Edu>

p4raw-id: //depot/perl@8881

op.c

diff --git a/op.c b/op.c
index af7221e..ab9d7b1 100644 (file)
--- a/op.c
+++ b/op.c
@@ -5799,6 +5799,7 @@ Perl_ck_glob(pTHX_ OP *o)
     gv = newGVgen("main");
     gv_IOadd(gv);
     append_elem(OP_GLOB, o, newGVOP(OP_GV, 0, gv));
+    SvREFCNT_dec((SV*)gv); /* had excess refcnt */
     scalarkids(o);
     return o;
 }