From: Gurusamy Sarathy Date: Fri, 17 Dec 1999 19:55:03 +0000 (+0000) Subject: leak in change#4694 spotted by Larry X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=79d01fbf58287276b77349e580651d9897f9b25c;p=p5sagit%2Fp5-mst-13.2.git leak in change#4694 spotted by Larry p4raw-link: @4694 on //depot/perl: 94f7643d7f26ed53393f1ab3452245da43de285e p4raw-id: //depot/perl@4696 --- diff --git a/hv.c b/hv.c index 8431cf7..9b01db7 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)