From: Nicholas Clark Date: Fri, 24 Feb 2006 21:42:33 +0000 (+0000) Subject: Given that Perl_gp_free() is refcount-dec-and-maybe-free for the glob X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=dd38834bfe79dc631f1823deed588b23c6db62d5;p=p5sagit%2Fp5-mst-13.2.git Given that Perl_gp_free() is refcount-dec-and-maybe-free for the glob pointer, it's inconsistent that it only sets this GV's GvGP to 0 if this GV happened to have the last reference. Why should this GV care if it had the last reference? So always set it to 0. It's free. Gone. p4raw-id: //depot/perl@27320 --- diff --git a/gv.c b/gv.c index 7197e26..0ec33ef 100644 --- a/gv.c +++ b/gv.c @@ -1390,6 +1390,7 @@ Perl_gp_free(pTHX_ GV *gv) if (--gp->gp_refcnt > 0) { if (gp->gp_egv == gv) gp->gp_egv = 0; + GvGP(gv) = 0; return; }