commit | 404e781249f003a37a140756fc4aeae463dcb217 | [log] [tgz] |
---|---|---|
author | Dan Carpenter <error27@gmail.com> | Wed Apr 21 12:30:32 2010 +0200 |
committer | Al Viro <viro@zeniv.linux.org.uk> | Sat May 15 07:16:33 2010 -0400 |
tree | 5eb0f81657ebecdd747583df54a261a4e305df3f | |
parent | 265624495f5acf6077f8f8d264f8170573d8d752 [diff] |
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>
diff --git a/fs/sysv/dir.c b/fs/sysv/dir.c index 4e50286..1dabed2 100644 --- a/fs/sysv/dir.c +++ b/fs/sysv/dir.c
@@ -164,8 +164,8 @@ name, de->name)) goto found; } + dir_put_page(page); } - dir_put_page(page); if (++n >= npages) n = 0;