summaryrefslogtreecommitdiff
path: root/scope.c
diff options
context:
space:
mode:
authorDave Mitchell <davem@fdisolutions.com>2004-03-14 20:13:47 +0000
committerDave Mitchell <davem@fdisolutions.com>2004-03-14 20:13:47 +0000
commitdb7334812f997133352bcd8e8b49bce918e13370 (patch)
tree383f6dfc1b081728af55f21d620f6fb9cde08cd0 /scope.c
parentaf5acbb47cec8f9dd3c4a2594507c21a7f1ce63b (diff)
downloadperl-db7334812f997133352bcd8e8b49bce918e13370.tar.gz
[perl #27638] scope exit could expose freed local() value
p4raw-id: //depot/perl@22500
Diffstat (limited to 'scope.c')
-rw-r--r--scope.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/scope.c b/scope.c
index 2c2ce3698e..2491150d62 100644
--- a/scope.c
+++ b/scope.c
@@ -782,8 +782,8 @@ Perl_leave_scope(pTHX_ I32 base)
* mg_get() in save_scalar_at() croaked */
SvMAGIC(value) = 0;
}
- SvREFCNT_dec(sv);
*(SV**)ptr = value;
+ SvREFCNT_dec(sv);
PL_localizing = 2;
SvSETMAGIC(value);
PL_localizing = 0;