提交 8744969a 编写于 作者: A Adrian Bunk 提交者: Linus Torvalds

fuse_file_alloc(): fix NULL dereferences

Fix obvious NULL dereferences spotted by the Coverity checker.
Signed-off-by: NAdrian Bunk <bunk@kernel.org>
Acked-by: NMiklos Szeredi <miklos@szeredi.hu>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 be21f0ab
......@@ -55,9 +55,10 @@ struct fuse_file *fuse_file_alloc(void)
if (!ff->reserved_req) {
kfree(ff);
ff = NULL;
} else {
INIT_LIST_HEAD(&ff->write_entry);
atomic_set(&ff->count, 0);
}
INIT_LIST_HEAD(&ff->write_entry);
atomic_set(&ff->count, 0);
}
return ff;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册