]> git.baikalelectronics.ru Git - kernel.git/commitdiff
cifs: lease key is uninitialized in smb1 paths
authorSteve French <stfrench@microsoft.com>
Sat, 15 Oct 2022 00:18:32 +0000 (19:18 -0500)
committerSteve French <stfrench@microsoft.com>
Sat, 15 Oct 2022 15:05:53 +0000 (10:05 -0500)
It is cleaner to set lease key to zero in the places where leases are not
supported (smb1 can not return lease keys so the field was uninitialized).

Addresses-Coverity: 1513994 ("Uninitialized scalar variable")
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/dir.c

index cbd46ac59cd2f13e671fc24795ed9c54b1806066..a5c73c2af3a264dca2515695a99ffa7c725d9314 100644 (file)
@@ -413,7 +413,7 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry,
        struct tcon_link *tlink;
        struct cifs_tcon *tcon;
        struct TCP_Server_Info *server;
-       struct cifs_fid fid;
+       struct cifs_fid fid = {};
        struct cifs_pending_open open;
        __u32 oplock;
        struct cifsFileInfo *file_info;