util/format: Use explicitly sized types
[mesa.git] / src / util / set.c
index f01f8699ac2d7ab3594f675e9e91ca1b374c3247..99abefd0632cdac1100cd994c59cab513543c91e 100644 (file)
@@ -282,7 +282,8 @@ set_add(struct set *ht, uint32_t hash, const void *key)
        * If freeing of old keys is required to avoid memory leaks,
        * perform a search before inserting.
        */
-      if (entry->hash == hash &&
+      if (!entry_is_deleted(entry) &&
+          entry->hash == hash &&
           ht->key_equals_function(key, entry->key)) {
          entry->key = key;
          return entry;