diff options
author | Father Chrysostomos <sprout@cpan.org> | 2010-10-23 09:48:31 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2010-10-23 09:50:03 -0700 |
commit | bf01568a4bfab00fb5180c6b243ef3c90ca3ebd6 (patch) | |
tree | 5888559d145efa3b719ef4cdc640d1dc8c2120e0 /sv.c | |
parent | 322c25164008331c3663036fb459ad70b8d1724c (diff) | |
download | perl-bf01568a4bfab00fb5180c6b243ef3c90ca3ebd6.tar.gz |
S_glob_assign_glob was using a potentially freed HV
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -3629,7 +3629,11 @@ S_glob_assign_glob(pTHX_ SV *const dstr, SV *const sstr, const int dtype) /* Set aside the old stash, so we can reset isa caches on its subclasses. */ - old_stash = GvHV(dstr); + if((old_stash = GvHV(dstr))) + /* Make sure we do not lose it early. */ + SvREFCNT_inc_simple_void_NN( + sv_2mortal((SV *)old_stash) + ); } } } |