fsck.f2fs: nullify raw_super pointer
authorJaegeuk Kim <jaegeuk@kernel.org>
Thu, 21 Jan 2016 01:13:14 +0000 (09:13 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 21 Jan 2016 13:13:56 +0000 (21:13 +0800)
Otherwise it will cause double free.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fsck/mount.c

index c4dfb0a..4c807f9 100644 (file)
@@ -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;