From 8ff3ab8503de51c8c4bd1b10c3e9c19ce181d352 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Sat, 11 Apr 2015 09:58:48 +0300 Subject: [PATCH] scrrun: Fix iterating through per-bucket pair list (Valgrind). --- dlls/scrrun/dictionary.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/scrrun/dictionary.c b/dlls/scrrun/dictionary.c index 631d0b0619d..844b4d11542 100644 --- a/dlls/scrrun/dictionary.c +++ b/dlls/scrrun/dictionary.c @@ -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;