xserver: Branch 'master'

Adam Jackson ajax at kemper.freedesktop.org
Tue Apr 10 18:41:59 UTC 2018


 Xext/hashtable.c |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 14be894b3f7976c133fc186e0e3c475606bab241
Author: Michal Srb <msrb at suse.com>
Date:   Tue Aug 1 10:29:03 2017 +0200

    Xext: Fix memory leaks in hashtable.
    
    Do not forget to delete key and value of every item and the hashtable itself.

diff --git a/Xext/hashtable.c b/Xext/hashtable.c
index 41b2e0013..93d1a2aec 100644
--- a/Xext/hashtable.c
+++ b/Xext/hashtable.c
@@ -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


More information about the xorg-commit mailing list