From: Junling Zheng Subject: [PATCH] fsck.f2fs: do umount to free memory in out_err Date: Thu, 17 May 2018 15:57:04 +0800 Message-ID: <20180517075704.168718-1-zhengjunling@huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1fJDn1-0008Lc-Kp for linux-f2fs-devel@lists.sourceforge.net; Thu, 17 May 2018 07:57:31 +0000 Received: from szxga04-in.huawei.com ([45.249.212.190] helo=huawei.com) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) id 1fJDmz-006yC8-6h for linux-f2fs-devel@lists.sourceforge.net; Thu, 17 May 2018 07:57:31 +0000 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net To: jaegeuk@kernel.org, yuchao0@huawei.com Cc: miaoxie@huawei.com, linux-f2fs-devel@lists.sourceforge.net Call f2fs_do_umount to free memory in out_err branch. Signed-off-by: Junling Zheng --- fsck/main.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/fsck/main.c b/fsck/main.c index c4dd8b1..870f2d8 100644 --- a/fsck/main.c +++ b/fsck/main.c @@ -844,9 +844,6 @@ retry: return 0; out_err: - if (sbi->ckpt) - free(sbi->ckpt); - if (sbi->raw_super) - free(sbi->raw_super); + f2fs_do_umount(sbi); return ret; } -- 2.16.2 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot