X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=e2fsck%2Fbadblocks.c;h=fec5f10dcec3d7856bd216690c9d24e389434bac;hb=2095266db8e4735e68079ac33cc6621fb47bf468;hp=8519df0d6153fefb58fed88bcae85cf04687b080;hpb=45ff69ffeb700012a7c052f5e45882557a40be7e;p=tools%2Fe2fsprogs.git diff --git a/e2fsck/badblocks.c b/e2fsck/badblocks.c index 8519df0..fec5f10 100644 --- a/e2fsck/badblocks.c +++ b/e2fsck/badblocks.c @@ -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; }