summaryrefslogtreecommitdiff
path: root/scope.c
diff options
context:
space:
mode:
authorDave Mitchell <davem@fdisolutions.com>2004-03-26 13:05:50 +0000
committerDave Mitchell <davem@fdisolutions.com>2004-03-26 13:05:50 +0000
commitdfa41748806263fb8b5d5fcb051bd36be96fe93c (patch)
tree489e1161a9e207248764b6552aba3327e675d317 /scope.c
parent61967be2c930c0a1754925d7a1d1c2924a3b57ab (diff)
downloadperl-dfa41748806263fb8b5d5fcb051bd36be96fe93c.tar.gz
[perl #27040] - hints hash was being double freed on scope exit
p4raw-id: //depot/perl@22594
Diffstat (limited to 'scope.c')
-rw-r--r--scope.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/scope.c b/scope.c
index cb56959ad9..452ea774fe 100644
--- a/scope.c
+++ b/scope.c
@@ -1042,6 +1042,11 @@ Perl_leave_scope(pTHX_ I32 base)
GvHV(PL_hintgv) = NULL;
}
*(I32*)&PL_hints = (I32)SSPOPINT;
+ if (PL_hints & HINT_LOCALIZE_HH) {
+ SvREFCNT_dec((SV*)GvHV(PL_hintgv));
+ GvHV(PL_hintgv) = (HV*)SSPOPPTR;
+ }
+
break;
case SAVEt_COMPPAD:
PL_comppad = (PAD*)SSPOPPTR;