Skip to content

Commit 2bff065

Browse files
author
Steve French
committed
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: Paulo Alcantara (SUSE) <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent 625b60d commit 2bff065

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/cifs/file.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ void _cifsFileInfo_put(struct cifsFileInfo *cifs_file,
489489
struct cifsInodeInfo *cifsi = CIFS_I(inode);
490490
struct super_block *sb = inode->i_sb;
491491
struct cifs_sb_info *cifs_sb = CIFS_SB(sb);
492-
struct cifs_fid fid;
492+
struct cifs_fid fid = {};
493493
struct cifs_pending_open open;
494494
bool oplock_break_cancelled;
495495

@@ -571,7 +571,7 @@ int cifs_open(struct inode *inode, struct file *file)
571571
void *page;
572572
const char *full_path;
573573
bool posix_open_ok = false;
574-
struct cifs_fid fid;
574+
struct cifs_fid fid = {};
575575
struct cifs_pending_open open;
576576
struct cifs_open_info_data data = {};
577577

0 commit comments

Comments
 (0)