summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2009-08-05 15:23:41 +0100
committerDavid Mitchell <davem@iabyn.com>2009-08-05 15:28:55 +0100
commitb0b93b3c773176a99136baa97661d11503277415 (patch)
tree2582439169e8108b3f1af7e3629c906c57b0bb80 /sv.c
parentc07671d7439660780f82b47a35f6ff224e370dba (diff)
downloadperl-b0b93b3c773176a99136baa97661d11503277415.tar.gz
in perl_clone_using, free the prt_table
*after* we have called any CLONE methods (better fix for Variable::Magic than 240bfeb992)
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sv.c b/sv.c
index 8bfe441089..a22316c72a 100644
--- a/sv.c
+++ b/sv.c
@@ -12349,11 +12349,6 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
PL_registered_mros = hv_dup_inc(proto_perl->Iregistered_mros, param);
- if (!(flags & CLONEf_KEEP_PTR_TABLE)) {
- ptr_table_free(PL_ptr_table);
- PL_ptr_table = NULL;
- }
-
/* Call the ->CLONE method, if it exists, for each of the stashes
identified by sv_dup() above.
*/
@@ -12373,6 +12368,12 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
}
}
+ if (!(flags & CLONEf_KEEP_PTR_TABLE)) {
+ ptr_table_free(PL_ptr_table);
+ PL_ptr_table = NULL;
+ }
+
+
SvREFCNT_dec(param->stashes);
/* orphaned? eg threads->new inside BEGIN or use */