diff options
Diffstat (limited to 'fs/cifs')
-rw-r--r-- | fs/cifs/inode.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index 49b47c33dff..da3e83fde09 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c @@ -793,8 +793,10 @@ struct inode *cifs_root_iget(struct super_block *sb, unsigned long ino) rc = cifs_get_inode_info(&inode, full_path, NULL, sb, xid, NULL); - if (!inode) - return ERR_PTR(-ENOMEM); + if (!inode) { + inode = ERR_PTR(-ENOMEM); + goto out; + } if (rc && cifs_sb->tcon->ipc) { cFYI(1, ("ipc connection - fake read inode")); @@ -805,13 +807,11 @@ struct inode *cifs_root_iget(struct super_block *sb, unsigned long ino) inode->i_uid = cifs_sb->mnt_uid; inode->i_gid = cifs_sb->mnt_gid; } else if (rc) { - kfree(full_path); - _FreeXid(xid); iget_failed(inode); - return ERR_PTR(rc); + inode = ERR_PTR(rc); } - +out: kfree(full_path); /* can not call macro FreeXid here since in a void func * TODO: This is no longer true |