summaryrefslogtreecommitdiff
path: root/av.c
diff options
context:
space:
mode:
authorDave Mitchell <davem@fdisolutions.com>2004-07-23 11:06:02 +0000
committerDave Mitchell <davem@fdisolutions.com>2004-07-23 11:06:02 +0000
commit2c8ddff3c182e26372c9343750c9b3c45e438ca2 (patch)
tree963b08715beee22e79b1a96ecd3b2f5720e1dc0a /av.c
parent7be51a492103f5312d8e2c90a7d13d18dab93c61 (diff)
downloadperl-2c8ddff3c182e26372c9343750c9b3c45e438ca2.tar.gz
[perl #30733] memory leak in array delete
av_delete() wasn't mortalizing the returned value p4raw-id: //depot/perl@23158
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;
}