[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-id: <000001ceda8d$5b185bd0$11491370$@samsung.com>
Date: Wed, 06 Nov 2013 09:12:04 +0800
From: Chao Yu <chao2.yu@...sung.com>
To: ??? <jaegeuk.kim@...sung.com>
Cc: linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-f2fs-devel@...ts.sourceforge.net,
谭姝 <shu.tan@...sung.com>
Subject: [f2fs-dev] [PATCH] f2fs: avoid to use a NULL point in
destroy_segment_manager
A NULL point should avoid to be used in destroy_segment_manager after allocating memory fail for f2fs_sm_info.
Signed-off-by: Chao Yu <chao2.yu@...sung.com>
---
fs/f2fs/segment.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 3d4d5fc..ff363e6
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -1744,6 +1744,8 @@ static void destroy_sit_info(struct f2fs_sb_info *sbi)
void destroy_segment_manager(struct f2fs_sb_info *sbi)
{
struct f2fs_sm_info *sm_info = SM_I(sbi);
+ if (!sm_info)
+ return;
destroy_dirty_segmap(sbi);
destroy_curseg(sbi);
destroy_free_segmap(sbi);
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists