summaryrefslogtreecommitdiff
path: root/mro.c
diff options
context:
space:
mode:
Diffstat (limited to 'mro.c')
-rw-r--r--mro.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mro.c b/mro.c
index da30c4df7b..4d7ade5747 100644
--- a/mro.c
+++ b/mro.c
@@ -546,6 +546,10 @@ Perl_mro_isa_changed_in(pTHX_ HV* stash)
SvREFCNT_dec((SV*)meta->mro_linear_c3);
meta->mro_linear_dfs = NULL;
meta->mro_linear_c3 = NULL;
+ if (meta->isa) {
+ SvREFCNT_dec(meta->isa);
+ meta->isa = NULL;
+ }
/* Inc the package generation, since our @ISA changed */
meta->pkg_gen++;