Skip to content

Commit

Permalink
fs/sysv: dereferencing ERR_PTR()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Al Viro committed May 15, 2010
1 parent 2656244 commit 404e781
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/sysv/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 404e781

Please sign in to comment.