[PATCH 03/10] e2fsck: fix memory leak on error path in read_bad_blocks_files()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Addresses-Coverity-Id: #1049170

Signed-off-by: "Theodore Ts'o" <tytso@xxxxxxx>
---
 e2fsck/badblocks.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/e2fsck/badblocks.c b/e2fsck/badblocks.c
index 8519df0..7f3641b 100644
--- a/e2fsck/badblocks.c
+++ b/e2fsck/badblocks.c
@@ -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;
 
 }
-- 
1.8.5.rc3.362.gdf10213

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux