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-Tag: accepted/trunk/20130322.191538~37714^2~30 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e826b3c791f291f41205a51805448110f3562b42;p=platform%2Fupstream%2Fperl.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);