[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210507110342.29566-1-sw0312.kim@samsung.com>
Date: Fri, 7 May 2021 20:03:41 +0900
From: Seung-Woo Kim <sw0312.kim@...sung.com>
To: aegeuk@...nel.org, linux-f2fs-devel@...ts.sourceforge.net
Cc: linux-kernel@...r.kernel.org, chao@...nel.org,
sw0312.kim@...sung.com
Subject: [PATCH 1/2] resize.f2fs: fix memory leak caused by migrate_nat()
Alloced nat_block doesn't freed from migrate_nat(). Fix to free
nat_block.
Signed-off-by: Seung-Woo Kim <sw0312.kim@...sung.com>
---
fsck/resize.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fsck/resize.c b/fsck/resize.c
index b043cd984dc6..78d578ec2cc1 100644
--- a/fsck/resize.c
+++ b/fsck/resize.c
@@ -383,6 +383,7 @@ static void migrate_nat(struct f2fs_sb_info *sbi,
ASSERT(ret >= 0);
DBG(3, "Write NAT: %lx\n", block_addr);
}
+ free(nat_block);
DBG(0, "Info: Done to migrate NAT blocks: nat_blkaddr = 0x%x -> 0x%x\n",
old_nat_blkaddr, new_nat_blkaddr);
}
--
2.19.2
Powered by blists - more mailing lists