summaryrefslogtreecommitdiff
path: root/av.c
diff options
context:
space:
mode:
Diffstat (limited to 'av.c')
-rw-r--r--av.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/av.c b/av.c
index 3eaeea8ecd..bedd04b41e 100644
--- a/av.c
+++ b/av.c
@@ -864,6 +864,8 @@ Perl_av_delete(pTHX_ AV *av, I32 key, I32 flags)
SvREFCNT_dec(sv);
sv = Nullsv;
}
+ else
+ sv = sv_2mortal(sv);
return sv;
}