summaryrefslogtreecommitdiff
path: root/scope.c
diff options
context:
space:
mode:
Diffstat (limited to 'scope.c')
-rw-r--r--scope.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/scope.c b/scope.c
index 595fe12665..85a068017c 100644
--- a/scope.c
+++ b/scope.c
@@ -959,6 +959,10 @@ Perl_leave_scope(pTHX_ I32 base)
PL_op = (OP*)SSPOPPTR;
break;
case SAVEt_HINTS:
+ if ((PL_hints & HINT_LOCALIZE_HH) && GvHV(PL_hintgv)) {
+ SvREFCNT_dec((SV*)GvHV(PL_hintgv));
+ GvHV(PL_hintgv) = NULL;
+ }
*(I32*)&PL_hints = (I32)SSPOPINT;
break;
case SAVEt_COMPPAD: