dedupe: fix warning and segfault on -B0
[fio.git] / t / dedupe.c
index 3ae17242f4a741bf2ccefd818f4fc8aeea3e6bc4..37437c2c4e970825ae61c7f0378503a6f7040879 100644 (file)
@@ -508,7 +508,7 @@ static int usage(char *argv[])
 
 int main(int argc, char *argv[])
 {
-       uint64_t nextents, nchunks;
+       uint64_t nextents = 0, nchunks = 0;
        int c, ret;
 
        debug_init();
@@ -564,7 +564,8 @@ int main(int argc, char *argv[])
        show_stat(nextents, nchunks);
 
        fio_mutex_remove(rb_lock);
-       bloom_free(bloom);
+       if (bloom)
+               bloom_free(bloom);
        scleanup();
        return ret;
 }