]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
cifs: fix SMB1 error path in cifs_get_file_info_unix
authorSteve French <stfrench@microsoft.com>
Sat, 19 Jun 2021 20:53:18 +0000 (15:53 -0500)
committerSteve French <stfrench@microsoft.com>
Mon, 21 Jun 2021 02:28:17 +0000 (21:28 -0500)
We were trying to fill in uninitialized file attributes in the error case.

Addresses-Coverity: 139689 ("Uninitialized variables")
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/inode.c

index 046b51dd34df5ea85189922bc80df6e3f79956cb..b96b253e7635a8ce887d77b16f04a9a6d04e37fe 100644 (file)
@@ -355,9 +355,12 @@ cifs_get_file_info_unix(struct file *filp)
        } else if (rc == -EREMOTE) {
                cifs_create_dfs_fattr(&fattr, inode->i_sb);
                rc = 0;
-       }
+       } else
+               goto cifs_gfiunix_out;
 
        rc = cifs_fattr_to_inode(inode, &fattr);
+
+cifs_gfiunix_out:
        free_xid(xid);
        return rc;
 }