diff options
author | Adrian M. Enache <enache@rdslink.ro> | 2003-12-10 08:05:58 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2003-12-14 16:34:01 +0000 |
commit | db0d1b5ffc348b23c327d53269dd0556cacc7156 (patch) | |
tree | 78bbad6d0e88570395fdea2379fcd73e05824427 /hv.c | |
parent | a5993b18fa9f77ffdd5da5fc1fd5905220e5c5bd (diff) | |
download | perl-db0d1b5ffc348b23c327d53269dd0556cacc7156.tar.gz |
Re: Change 21862
Message-ID: <20031210040558.GC1584@ratsnest.hole>
(1st hunk), plus the equivalent for hv_delete_common
p4raw-id: //depot/perl@21905
Diffstat (limited to 'hv.c')
-rw-r--r-- | hv.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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); |