aboutsummaryrefslogtreecommitdiffstats
path: root/fs/9p
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-08-04 12:27:45 -0400
committerEric Van Hensbergen <ericvh@gmail.com>2010-08-30 11:35:28 -0400
commit8f587df479c3cea14ba1a9b9d58f34fd2fd6d58b (patch)
tree5c01cd8b1fa9ecea9af268890d39a49b017a8631 /fs/9p
parent2bfc96a127bc1cc94d26bfaa40159966064f9c8c (diff)
9p: potential ERR_PTR() dereference
p9_client_walk() can return error values if we run out of space or there is a problem with the network. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'fs/9p')
-rw-r--r--fs/9p/fid.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/9p/fid.c b/fs/9p/fid.c
index 358563689064..6406f896bf95 100644
--- a/fs/9p/fid.c
+++ b/fs/9p/fid.c
@@ -242,7 +242,8 @@ struct p9_fid *v9fs_fid_lookup(struct dentry *dentry)
242 } 242 }
243 kfree(wnames); 243 kfree(wnames);
244fid_out: 244fid_out:
245 v9fs_fid_add(dentry, fid); 245 if (!IS_ERR(fid))
246 v9fs_fid_add(dentry, fid);
246err_out: 247err_out:
247 up_read(&v9ses->rename_sem); 248 up_read(&v9ses->rename_sem);
248 return fid; 249 return fid;