mirror of
https://gitee.com/openharmony/third_party_f2fs-tools
synced 2024-11-27 04:00:57 +00:00
mkfs.f2fs: fix memory leak in not enough segments error path
commit 1900c22ed2
category: bugfix
issue: #I6VAS0
CVE: NA
Signed-off-by: DongSenhao <dongsenhao2@huawei.com>
---------------------------------------
In not enough segements error path of f2fs_write_check_point_pack(),
cp_payload is not freed. Fix the error path.
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: dongsenhao <dongsenhao2@huawei.com>
This commit is contained in:
parent
63f4592769
commit
6277e2330f
@ -725,7 +725,7 @@ static int f2fs_write_check_point_pack(void)
|
|||||||
|
|
||||||
if (f2fs_get_usable_segments(sb) <= get_cp(overprov_segment_count)) {
|
if (f2fs_get_usable_segments(sb) <= get_cp(overprov_segment_count)) {
|
||||||
MSG(0, "\tError: Not enough segments to create F2FS Volume\n");
|
MSG(0, "\tError: Not enough segments to create F2FS Volume\n");
|
||||||
goto free_nat_bits;
|
goto free_cp_payload;
|
||||||
}
|
}
|
||||||
MSG(0, "Info: Overprovision ratio = %.3lf%%\n", c.overprovision);
|
MSG(0, "Info: Overprovision ratio = %.3lf%%\n", c.overprovision);
|
||||||
MSG(0, "Info: Overprovision segments = %u (GC reserved = %u)\n",
|
MSG(0, "Info: Overprovision segments = %u (GC reserved = %u)\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user