projects
/
platform
/
upstream
/
f2fs-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e5b3ec8
)
fsck.f2fs: free cp_page_1 in validate_checkpoint
author
Junling Zheng
<zhengjunling@huawei.com>
Thu, 29 Sep 2016 10:38:34 +0000
(18:38 +0800)
committer
Jaegeuk Kim
<jaegeuk@kernel.org>
Mon, 3 Oct 2016 17:57:49 +0000
(10:57 -0700)
Free cp_page_1 in validate_checkpoint to avoid memory leak.
Signed-off-by: Junling Zheng <zhengjunling@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fsck/mount.c
patch
|
blob
|
history
diff --git
a/fsck/mount.c
b/fsck/mount.c
index
901ee21
..
e44edeb
100644
(file)
--- a/
fsck/mount.c
+++ b/
fsck/mount.c
@@
-494,7
+494,7
@@
void *validate_checkpoint(struct f2fs_sb_info *sbi, block_t cp_addr,
/* Read the 1st cp block in this CP pack */
cp_page_1 = malloc(PAGE_SIZE);
if (dev_read_block(cp_page_1, cp_addr) < 0)
-
return NULL
;
+
goto invalid_cp1
;
cp = (struct f2fs_checkpoint *)cp_page_1;
crc_offset = get_cp(checksum_offset);