Xext: Fix memory leaks in hashtable.

Do not forget to delete key and value of every item and the hashtable itself.
This commit is contained in:
Michal Srb 2017-08-01 10:29:03 +02:00 committed by Adam Jackson
parent 1326ee0bc5
commit 14be894b3f

View File

@ -77,10 +77,13 @@ ht_destroy(HashTable ht)
for (c = 0; c < numBuckets; ++c) {
xorg_list_for_each_entry_safe(it, tmp, &ht->buckets[c], l) {
xorg_list_del(&it->l);
free(it->key);
free(it->data);
free(it);
}
}
free(ht->buckets);
free(ht);
}
static Bool