summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-02-24 21:42:33 +0000
committerNicholas Clark <nick@ccl4.org>2006-02-24 21:42:33 +0000
commitdd38834bfe79dc631f1823deed588b23c6db62d5 (patch)
tree5a031a7bf763077367771333987d7b3e18afdc24 /gv.c
parent064cf52948e2ac0b1b809d55fe1b456a0b0fa4c4 (diff)
downloadperl-dd38834bfe79dc631f1823deed588b23c6db62d5.tar.gz
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
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gv.c b/gv.c
index 7197e26e9f..0ec33efae6 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;
}