Otherwise, we get a double free error by:

In fsck/main.c,

545 out_err:
546         if (sbi->ckpt)
547                 free(sbi->ckpt);

Signed-off-by: Jaegeuk Kim <[email protected]>
---
 fsck/mount.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fsck/mount.c b/fsck/mount.c
index 51d50ec..37a0025 100644
--- a/fsck/mount.c
+++ b/fsck/mount.c
@@ -502,6 +502,7 @@ int get_valid_checkpoint(struct f2fs_sb_info *sbi)
 
 fail_no_cp:
        free(sbi->ckpt);
+       sbi->ckpt = NULL;
        return -EINVAL;
 }
 
-- 
2.6.3


------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to