summaryrefslogtreecommitdiff
path: root/hv.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-12-17 19:55:03 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-12-17 19:55:03 +0000
commit79d01fbf58287276b77349e580651d9897f9b25c (patch)
treeb9a9ef64eb7801899113e297588115a77f7784ff /hv.c
parent2f83d9b6a171aadfd0629f898fd93b63a1640c5f (diff)
downloadperl-79d01fbf58287276b77349e580651d9897f9b25c.tar.gz
leak in change#4694 spotted by Larry
p4raw-link: @4694 on //depot/perl: 94f7643d7f26ed53393f1ab3452245da43de285e p4raw-id: //depot/perl@4696
Diffstat (limited to 'hv.c')
-rw-r--r--hv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hv.c b/hv.c
index 8431cf7aa4..9b01db7471 100644
--- a/hv.c
+++ b/hv.c
@@ -503,7 +503,7 @@ Perl_hv_delete(pTHX_ HV *hv, const char *key, U32 klen, I32 flags)
if (flags & G_DISCARD)
sv = Nullsv;
else {
- sv = HeVAL(entry);
+ sv = sv_2mortal(HeVAL(entry));
HeVAL(entry) = &PL_sv_undef;
}
if (entry == xhv->xhv_eiter)
@@ -579,7 +579,7 @@ Perl_hv_delete_ent(pTHX_ HV *hv, SV *keysv, I32 flags, U32 hash)
if (flags & G_DISCARD)
sv = Nullsv;
else {
- sv = HeVAL(entry);
+ sv = sv_2mortal(HeVAL(entry));
HeVAL(entry) = &PL_sv_undef;
}
if (entry == xhv->xhv_eiter)