Skip to content

Commit

Permalink
cifs: lease key is uninitialized in smb1 paths
Browse files Browse the repository at this point in the history
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) <[email protected]>
Signed-off-by: Steve French <[email protected]>
  • Loading branch information
Steve French committed Oct 15, 2022
1 parent f09bd69 commit 625b60d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/cifs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 625b60d

Please sign in to comment.