This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re: perl@15772
authorNicholas Clark <nick@ccl4.org>
Sun, 7 Apr 2002 11:06:42 +0000 (12:06 +0100)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Sun, 7 Apr 2002 11:15:46 +0000 (11:15 +0000)
Message-ID: <20020407110641.O10686@plum.flirble.org>

p4raw-id: //depot/perl@15775

hv.c

diff --git a/hv.c b/hv.c
index d5b7274..1d967ce 100644 (file)
--- a/hv.c
+++ b/hv.c
@@ -299,7 +299,7 @@ S_hv_fetch_flags(pTHX_ HV *hv, const char *key, I32 klen, I32 lval, int flags)
        if (env) {
            sv = newSVpvn(env,len);
            SvTAINTED_on(sv);
-           if (key != keysave)
+           if (flags & HVhek_FREEKEY)
                Safefree(key);
            return hv_store(hv,key,klen,sv,hash);
        }