From e826b3c791f291f41205a51805448110f3562b42 Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Sat, 4 Apr 1998 22:35:54 +0000 Subject: [PATCH] [win32] fix refcounting of GvSTASH() when glob becomes nought (this takes care of the "unbalanced strtab refcount" problem) p4raw-id: //depot/win32/perl@880 --- sv.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sv.c b/sv.c index 1abc3fd..2711551 100644 --- a/sv.c +++ b/sv.c @@ -4115,6 +4115,10 @@ sv_unglob(SV *sv) SvFAKE_off(sv); if (GvGP(sv)) gp_free((GV*)sv); + if (GvSTASH(sv)) { + SvREFCNT_dec(GvSTASH(sv)); + GvSTASH(sv) = Nullhv; + } sv_unmagic(sv, '*'); Safefree(GvNAME(sv)); GvMULTI_off(sv); -- 2.7.4