diff options
Diffstat (limited to 'fs/9p/vfs_super.c')
-rw-r--r-- | fs/9p/vfs_super.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/9p/vfs_super.c b/fs/9p/vfs_super.c index bb0cef9a6b8a..678c02f1ae23 100644 --- a/fs/9p/vfs_super.c +++ b/fs/9p/vfs_super.c | |||
@@ -119,6 +119,7 @@ static int v9fs_get_sb(struct file_system_type *fs_type, int flags, | |||
119 | 119 | ||
120 | P9_DPRINTK(P9_DEBUG_VFS, " \n"); | 120 | P9_DPRINTK(P9_DEBUG_VFS, " \n"); |
121 | 121 | ||
122 | st = NULL; | ||
122 | v9ses = kzalloc(sizeof(struct v9fs_session_info), GFP_KERNEL); | 123 | v9ses = kzalloc(sizeof(struct v9fs_session_info), GFP_KERNEL); |
123 | if (!v9ses) | 124 | if (!v9ses) |
124 | return -ENOMEM; | 125 | return -ENOMEM; |
@@ -164,10 +165,12 @@ static int v9fs_get_sb(struct file_system_type *fs_type, int flags, | |||
164 | root->d_inode->i_ino = v9fs_qid2ino(&st->qid); | 165 | root->d_inode->i_ino = v9fs_qid2ino(&st->qid); |
165 | v9fs_stat2inode(st, root->d_inode, sb); | 166 | v9fs_stat2inode(st, root->d_inode, sb); |
166 | v9fs_fid_add(root, fid); | 167 | v9fs_fid_add(root, fid); |
168 | kfree(st); | ||
167 | 169 | ||
168 | return simple_set_mnt(mnt, sb); | 170 | return simple_set_mnt(mnt, sb); |
169 | 171 | ||
170 | error: | 172 | error: |
173 | kfree(st); | ||
171 | if (fid) | 174 | if (fid) |
172 | p9_client_clunk(fid); | 175 | p9_client_clunk(fid); |
173 | 176 | ||