From: Wolfgang (Blub) Bumiller Date: Sun, 25 Nov 2012 14:12:16 +0000 (+0100) Subject: fixing a leak in the hashtables, htdel didn't delete the hash_node_t entries X-Git-Tag: 0.1.9~277 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a1b50603e54ba8d63515b14f1f69549c3f7d7713;p=xonotic%2Fgmqcc.git fixing a leak in the hashtables, htdel didn't delete the hash_node_t entries --- diff --git a/util.c b/util.c index 1bbbf96..6853393 100644 --- a/util.c +++ b/util.c @@ -640,12 +640,15 @@ void util_htdel(hash_table_t *ht) { size_t i = 0; for (; i < ht->size; i++) { hash_node_t *n = ht->table[i]; + hash_node_t *p; /* free in list */ while (n) { if (n->key) mem_d(n->key); + p = n; n = n->next; + mem_d(p); } }