mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-11-20 00:26:39 +08:00
fs/sysv: dereferencing ERR_PTR()
I moved the dir_put_page() inside the if condition so we don't dereference "page", if it's an ERR_PTR(). Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
265624495f
commit
404e781249
@ -164,8 +164,8 @@ struct sysv_dir_entry *sysv_find_entry(struct dentry *dentry, struct page **res_
|
||||
name, de->name))
|
||||
goto found;
|
||||
}
|
||||
dir_put_page(page);
|
||||
}
|
||||
dir_put_page(page);
|
||||
|
||||
if (++n >= npages)
|
||||
n = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user