diff options
author | Jason Ekstrand <[email protected]> | 2015-02-04 18:29:32 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-02-07 17:01:05 -0800 |
commit | c9287e797b3e58bd4403f79d484e7235dc59262d (patch) | |
tree | 1582426ba9006bddad06260403b12aad0369bddc /src/mesa | |
parent | 1581e12aba3712fe4884586c7be6087b0a4a0041 (diff) |
util/hash_table: Do a full search when adding new items
Previously, the hash_table_insert function would bail early if it found a
deleted slot that it could re-use. However, this is a problem if the key
being inserted is already in the hash table but further down the list. If
this happens, the element ends up getting inserted in the hash table twice.
This commit makes it so that we walk over all of the possible entries for
the given key and then, if we don't find the key, place it in the available
free entry we found.
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa')
0 files changed, 0 insertions, 0 deletions