We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2040fce commit a2125ffCopy full SHA for a2125ff
fs/f2fs/checkpoint.c
@@ -770,7 +770,7 @@ int get_valid_checkpoint(struct f2fs_sb_info *sbi)
770
771
/* Sanity checking of checkpoint */
772
if (sanity_check_ckpt(sbi))
773
- goto fail_no_cp;
+ goto free_fail_no_cp;
774
775
if (cur_page == cp1)
776
sbi->cur_cp_pack = 1;
@@ -798,6 +798,9 @@ int get_valid_checkpoint(struct f2fs_sb_info *sbi)
798
f2fs_put_page(cp2, 1);
799
return 0;
800
801
+free_fail_no_cp:
802
+ f2fs_put_page(cp1, 1);
803
+ f2fs_put_page(cp2, 1);
804
fail_no_cp:
805
kfree(sbi->ckpt);
806
return -EINVAL;
0 commit comments