From e92fd4261894903fb8d6fa8de6a38c5eaf1a913c Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Thu, 21 Jan 2016 09:13:14 +0800 Subject: [PATCH] fsck.f2fs: nullify raw_super pointer Otherwise it will cause double free. Signed-off-by: Jaegeuk Kim --- fsck/mount.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fsck/mount.c b/fsck/mount.c index c4dfb0a..4c807f9 100644 --- a/fsck/mount.c +++ b/fsck/mount.c @@ -339,6 +339,7 @@ int validate_super_block(struct f2fs_sb_info *sbi, int block) } free(sbi->raw_super); + sbi->raw_super = NULL; MSG(0, "\tCan't find a valid F2FS superblock at 0x%x\n", block); return -EINVAL; -- 2.7.4