summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-04-04 22:35:54 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-04-04 22:35:54 +0000
commite826b3c791f291f41205a51805448110f3562b42 (patch)
treeabcc9f364cf3fe3a4513bf6c97ae0d5db78f622d
parent257c9e5b5a08bebee2d7b4f15b846e289d3cdcb8 (diff)
downloadperl-e826b3c791f291f41205a51805448110f3562b42.tar.gz
[win32] fix refcounting of GvSTASH() when glob becomes nought
(this takes care of the "unbalanced strtab refcount" problem) p4raw-id: //depot/win32/perl@880
-rw-r--r--sv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sv.c b/sv.c
index 1abc3fdae1..2711551217 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);