summaryrefslogtreecommitdiff
path: root/mro.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2010-10-24 10:42:33 -0700
committerFather Chrysostomos <sprout@cpan.org>2010-10-24 10:42:52 -0700
commitdbe2fffcb043e3f633e8c31acbe8a158c7083248 (patch)
treea36f9e493b51004ae4e107347b935bc92e96a831 /mro.c
parent23098a26ae8f44fa7dff4159b4876faab0559a64 (diff)
downloadperl-dbe2fffcb043e3f633e8c31acbe8a158c7083248.tar.gz
Make mro_package_moved use a mortal in case mro_isa_changed_in3 croaks
Diffstat (limited to 'mro.c')
-rw-r--r--mro.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/mro.c b/mro.c
index b065d70fca..8fe6b2012e 100644
--- a/mro.c
+++ b/mro.c
@@ -631,7 +631,7 @@ Perl_mro_package_moved(pTHX_ HV * const stash, const HV * const oldstash,
/* Skip the entire loop if the hash is empty. */
if(oldstash && HvUSEDKEYS(oldstash)) {
xhv = (XPVHV*)SvANY(oldstash);
- seen = newHV();
+ seen = (HV *) sv_2mortal((SV *)newHV());
/* Iterate through entries in the oldstash, calling
mro_package_moved(
@@ -734,7 +734,6 @@ Perl_mro_package_moved(pTHX_ HV * const stash, const HV * const oldstash,
}
}
- if(seen) SvREFCNT_dec((SV *)seen);
}
/*