projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4bf08ff
)
f2fs: avoid to use a NULL point in destroy_segment_manager
author
Chao Yu
<chao2.yu@samsung.com>
Wed, 6 Nov 2013 01:12:04 +0000
(09:12 +0800)
committer
Jaegeuk Kim
<jaegeuk.kim@samsung.com>
Wed, 6 Nov 2013 07:37:44 +0000
(16:37 +0900)
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>
fs/f2fs/segment.c
patch
|
blob
|
history
diff --git
a/fs/f2fs/segment.c
b/fs/f2fs/segment.c
index 3d4d5fc19e6fc6ad14be01a3d11b1dd68273b0fd..ff363e686b7e4324433a7ec927e90da450798386 100644
(file)
--- 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);