scrrun: Fix iterating through per-bucket pair list (Valgrind).

This commit is contained in:
Nikolay Sivov 2015-04-11 09:58:48 +03:00 committed by Alexandre Julliard
parent af4324e433
commit 8ff3ab8503
1 changed files with 2 additions and 1 deletions

View File

@ -154,10 +154,11 @@ static struct keyitem_pair *get_keyitem_pair(dictionary *dict, VARIANT *key)
if (FAILED(hr))
return NULL;
entry = head = get_bucket_head(dict, V_I4(&hash));
head = get_bucket_head(dict, V_I4(&hash));
if (!head->next || list_empty(head))
return NULL;
entry = list_head(head);
do {
pair = LIST_ENTRY(entry, struct keyitem_pair, bucket);
if (is_matching_key(dict, pair, key, V_I4(&hash))) return pair;