Stop ENV_IS_CASELESS hv.c picking up the wrong hash value from a
Nicholas Clark [Tue, 6 Jul 2004 20:45:53 +0000 (20:45 +0000)]
shared string scalar.

p4raw-id: //depot/perl@23058

hv.c

diff --git a/hv.c b/hv.c
index ca945f6..54f2e54 100644 (file)
--- a/hv.c
+++ b/hv.c
@@ -505,6 +505,7 @@ S_hv_fetch_common(pTHX_ HV *hv, SV *keysv, const char *key, STRLEN klen,
                key = (const char*)strupr((char*)key);
                is_utf8 = 0;
                hash = 0;
+               keysv = 0;
 
                if (flags & HVhek_FREEKEY) {
                    Safefree(keysave);
@@ -547,6 +548,7 @@ S_hv_fetch_common(pTHX_ HV *hv, SV *keysv, const char *key, STRLEN klen,
                    key = (const char*)strupr((char*)key);
                    is_utf8 = 0;
                    hash = 0;
+                   keysv = 0;
 
                    if (flags & HVhek_FREEKEY) {
                        Safefree(keysave);