提交 165f9859 编写于 作者: D Daniel Mack 提交者: Wolfgang Denk

ubifs: fix small error path mismatch

In do_readpage(), don't free 'dn' if its allocation failed.
Signed-off-by: NDaniel Mack <daniel@caiaq.de>
上级 de7cf709
......@@ -554,10 +554,8 @@ static int do_readpage(struct ubifs_info *c, struct inode *inode, struct page *p
}
dn = kmalloc(UBIFS_MAX_DATA_NODE_SZ, GFP_NOFS);
if (!dn) {
err = -ENOMEM;
goto error;
}
if (!dn)
return -ENOMEM;
i = 0;
while (1) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册