Commit 2bff0659 authored by Steve French's avatar Steve French

cifs: lease key is uninitialized in two additional functions when smb1

cifs_open and _cifsFileInfo_put also end up with lease_key uninitialized
in smb1 mounts.  It is cleaner to set lease key to zero in these
places where leases are not supported (smb1 can not return lease keys
so the field was uninitialized).

Addresses-Coverity: 1514207 ("Uninitialized scalar variable")
Addresses-Coverity: 1514331 ("Uninitialized scalar variable")
Reviewed-by: default avatarPaulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 625b60d4
...@@ -489,7 +489,7 @@ void _cifsFileInfo_put(struct cifsFileInfo *cifs_file, ...@@ -489,7 +489,7 @@ void _cifsFileInfo_put(struct cifsFileInfo *cifs_file,
struct cifsInodeInfo *cifsi = CIFS_I(inode); struct cifsInodeInfo *cifsi = CIFS_I(inode);
struct super_block *sb = inode->i_sb; struct super_block *sb = inode->i_sb;
struct cifs_sb_info *cifs_sb = CIFS_SB(sb); struct cifs_sb_info *cifs_sb = CIFS_SB(sb);
struct cifs_fid fid; struct cifs_fid fid = {};
struct cifs_pending_open open; struct cifs_pending_open open;
bool oplock_break_cancelled; bool oplock_break_cancelled;
...@@ -571,7 +571,7 @@ int cifs_open(struct inode *inode, struct file *file) ...@@ -571,7 +571,7 @@ int cifs_open(struct inode *inode, struct file *file)
void *page; void *page;
const char *full_path; const char *full_path;
bool posix_open_ok = false; bool posix_open_ok = false;
struct cifs_fid fid; struct cifs_fid fid = {};
struct cifs_pending_open open; struct cifs_pending_open open;
struct cifs_open_info_data data = {}; struct cifs_open_info_data data = {};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment