From: Gurusamy Sarathy Date: Sat, 4 Apr 1998 22:35:54 +0000 (+0000) Subject: [win32] fix refcounting of GvSTASH() when glob becomes nought X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e826b3c791f291f41205a51805448110f3562b42;p=p5sagit%2Fp5-mst-13.2.git [win32] fix refcounting of GvSTASH() when glob becomes nought (this takes care of the "unbalanced strtab refcount" problem) p4raw-id: //depot/win32/perl@880 --- 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);