diff options
author | Chao Yu <chao2.yu@samsung.com> | 2013-11-05 20:12:04 -0500 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-11-06 02:37:44 -0500 |
commit | 3b03f72445ba1437cfa29f9719bb3cfdb60558d9 (patch) | |
tree | d88bdc59bf7277157ed94c1e51870389ec7740a3 /fs/f2fs/segment.c | |
parent | 4bf08ff6f9f381fa625d65e36c3e8e57313943cf (diff) |
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@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/segment.c')
-rw-r--r-- | fs/f2fs/segment.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 3d4d5fc19e6f..ff363e686b7e 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c | |||
@@ -1744,6 +1744,8 @@ static void destroy_sit_info(struct f2fs_sb_info *sbi) | |||
1744 | void destroy_segment_manager(struct f2fs_sb_info *sbi) | 1744 | void destroy_segment_manager(struct f2fs_sb_info *sbi) |
1745 | { | 1745 | { |
1746 | struct f2fs_sm_info *sm_info = SM_I(sbi); | 1746 | struct f2fs_sm_info *sm_info = SM_I(sbi); |
1747 | if (!sm_info) | ||
1748 | return; | ||
1747 | destroy_dirty_segmap(sbi); | 1749 | destroy_dirty_segmap(sbi); |
1748 | destroy_curseg(sbi); | 1750 | destroy_curseg(sbi); |
1749 | destroy_free_segmap(sbi); | 1751 | destroy_free_segmap(sbi); |