Make rpmstrPoolUnfreeze() safe to call on unfrozen pool
authorPanu Matilainen <pmatilai@redhat.com>
Tue, 11 Sep 2012 06:01:49 +0000 (09:01 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Tue, 11 Sep 2012 06:01:49 +0000 (09:01 +0300)
rpmio/rpmstrpool.c

index 14a6466..87e025e 100644 (file)
@@ -72,7 +72,7 @@ void rpmstrPoolFreeze(rpmstrPool pool)
 
 void rpmstrPoolUnfreeze(rpmstrPool pool)
 {
-    if (pool) {
+    if (pool && pool->hash == NULL) {
        int sizehint = (pool->offs_size / 2) - 1;
        if (sizehint < STRHASH_INITSIZE)
            sizehint = STRHASH_INITSIZE;