From: Adrian M. Enache Date: Wed, 10 Dec 2003 06:05:58 +0000 (+0200) Subject: Re: Change 21862 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e593d2fe2376152f45b2d89d0e59a1b9b2af5bb5;p=p5sagit%2Fp5-mst-13.2.git Re: Change 21862 Message-ID: <20031210040558.GC1584@ratsnest.hole> (1st hunk), plus the equivalent for hv_delete_common p4raw-id: //depot/perl@21905 --- diff --git a/hv.c b/hv.c index 7115332..601f52f 100644 --- a/hv.c +++ b/hv.c @@ -381,6 +381,8 @@ S_hv_fetch_common(pTHX_ HV *hv, SV *keysv, const char *key, STRLEN klen, return 0; if (keysv) { + if (flags & HVhek_FREEKEY) + Safefree(key); key = SvPV(keysv, klen); flags = 0; is_utf8 = (SvUTF8(keysv) != 0); @@ -873,6 +875,8 @@ S_hv_delete_common(pTHX_ HV *hv, SV *keysv, const char *key, STRLEN klen, return Nullsv; if (keysv) { + if (k_flags & HVhek_FREEKEY) + Safefree(key); key = SvPV(keysv, klen); k_flags = 0; is_utf8 = (SvUTF8(keysv) != 0);