diff options
author | David Mitchell <davem@iabyn.com> | 2009-08-05 15:23:41 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2009-08-05 15:28:55 +0100 |
commit | b0b93b3c773176a99136baa97661d11503277415 (patch) | |
tree | 2582439169e8108b3f1af7e3629c906c57b0bb80 /sv.c | |
parent | c07671d7439660780f82b47a35f6ff224e370dba (diff) | |
download | perl-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.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -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 */ |