Commit 404e781249f003a37a140756fc4aeae463dcb217

Authored by Dan Carpenter
Committed by Al Viro
1 parent 265624495f

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>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -164,8 +164,8 @@
164 164 name, de->name))
165 165 goto found;
166 166 }
  167 + dir_put_page(page);
167 168 }
168   - dir_put_page(page);
169 169  
170 170 if (++n >= npages)
171 171 n = 0;