From 9a757a721f675ceab5f0de2731c1de25f479f6c5 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 3 Nov 2009 12:50:46 -0800 Subject: [PATCH] hmap: Fix bug in hmap_replace(). When hmap_replace() replaces one hash table node by another, it must ensure that any nodes following the old node also follow the new node, by copying the "next" pointer from "old" to "new". --- lib/hmap.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/hmap.h b/lib/hmap.h index 1809a91b..98088059 100644 --- a/lib/hmap.h +++ b/lib/hmap.h @@ -190,6 +190,7 @@ hmap_replace(struct hmap *hmap, } *bucket = new; new->hash = old->hash; + new->next = old->next; } static inline struct hmap_node * -- 2.30.2