Use constfree for rpmhash key + data for now
authorPanu Matilainen <pmatilai@redhat.com>
Tue, 18 Dec 2007 07:19:22 +0000 (09:19 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Tue, 18 Dec 2007 07:19:22 +0000 (09:19 +0200)
- sometimes they point to real const data, sometimes not, eww

rpmdb/rpmhash.c

index 5ea0ca7..9357f94 100644 (file)
@@ -134,12 +134,12 @@ hashTable htFree(hashTable ht)
            continue;
        ht->buckets[i] = NULL;
        if (ht->keySize > 0)
-           b->key = _free(b->key);
+           b->key = _constfree(b->key);
        do {
            n = b->next;
            if (b->data) {
                if (ht->freeData)
-                   *b->data = _free(*b->data);
+                   *b->data = _constfree(*b->data);
                b->data = _free(b->data);
            }
            b = _free(b);