Free all keys not only those on the first buckets
authorFlorian Festi <ffesti@redhat.com>
Sat, 14 Mar 2009 18:12:43 +0000 (19:12 +0100)
committerFlorian Festi <ffesti@redhat.com>
Sat, 14 Mar 2009 18:12:43 +0000 (19:12 +0100)
 - Thanks to Alexey Tourbin for pointing that out!

lib/rpmhash.C

index 1c11889..3ef1c69 100644 (file)
@@ -129,11 +129,11 @@ HASHTYPE HASHPREFIX(Free)(HASHTYPE ht)
        if (b == NULL)
            continue;
        ht->buckets[i] = NULL;
-       if (ht->freeKey)
-           b->key = ht->freeKey(b->key);
 
        do {
            n = b->next;
+           if (ht->freeKey)
+               b->key = ht->freeKey(b->key);
 #ifdef HTDATATYPE
            if (ht->freeData) {
                int j;