Skip to content
Snippets Groups Projects
Commit 165f9859 authored by Daniel Mack's avatar Daniel Mack Committed by Wolfgang Denk
Browse files

ubifs: fix small error path mismatch


In do_readpage(), don't free 'dn' if its allocation failed.

Signed-off-by: default avatarDaniel Mack <daniel@caiaq.de>
parent de7cf709
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment