Whamcloud - gitweb
e2fsck: merge quota context after threads finish
[tools/e2fsprogs.git] / e2fsck / badblocks.c
index 8519df0..fec5f10 100644 (file)
@@ -76,7 +76,8 @@ void read_bad_blocks_file(e2fsck_t ctx, const char *bad_blocks_file,
                sprintf(buf, "badblocks -b %d -X %s%s%s %llu", fs->blocksize,
                        (ctx->options & E2F_OPT_PREEN) ? "" : "-s ",
                        (ctx->options & E2F_OPT_WRITECHECK) ? "-n " : "",
-                       fs->device_name, ext2fs_blocks_count(fs->super)-1);
+                       fs->device_name,
+                       (unsigned long long) ext2fs_blocks_count(fs->super)-1);
                f = popen(buf, "r");
                if (!f) {
                        com_err("read_bad_blocks_file", errno,
@@ -111,6 +112,8 @@ void read_bad_blocks_file(e2fsck_t ctx, const char *bad_blocks_file,
 
 fatal:
        ctx->flags |= E2F_FLAG_ABORT;
+       if (bb_list)
+               ext2fs_badblocks_list_free(bb_list);
        return;
 
 }