]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
e2fsck: fix memory leak on error path in read_bad_blocks_files()
authorTheodore Ts'o <tytso@mit.edu>
Tue, 7 Jan 2014 05:47:40 +0000 (00:47 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 7 Jan 2014 14:10:24 +0000 (09:10 -0500)
Addresses-Coverity-Id: #1049170

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
e2fsck/badblocks.c

index 8519df0d6153fefb58fed88bcae85cf04687b080..7f3641b5e6c4e9c5e5d29f50116bf7162a38ad61 100644 (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;
 
 }