summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hv.c b/hv.c
index d5b7274c91..1d967ce20e 100644
--- 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);
}