This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
glob-in-eval memory leak fix
authorCharles Lane <lane@DUPHY4.Physics.Drexel.Edu>
Wed, 21 Feb 2001 13:08:03 +0000 (08:08 -0500)
committerJarkko Hietaniemi <jhi@iki.fi>
Wed, 21 Feb 2001 19:38:57 +0000 (19:38 +0000)
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;
 }