e2fsck: fix memory leak on error path in read_bad_blocks_files()

Addresses-Coverity-Id: #1049170

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
maint-test
Theodore Ts'o 2014-01-07 00:47:40 -05:00
parent d887b93701
commit 2c98ce4b56
1 changed files with 2 additions and 0 deletions

View File

@ -111,6 +111,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;
}