Commit 90a98b2f authored by Jeff Layton's avatar Jeff Layton Committed by Steve French
Browse files

cifs: free nativeFileSystem field before allocating a new one

...otherwise, we'll leak this memory if we have to reconnect (e.g. after
network failure).
Signed-off-by: default avatarJeff Layton <>
CC: Stable <>
Signed-off-by: default avatarSteve French <>
parent 287638b2
......@@ -2726,6 +2726,7 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses,
strncpy(tcon->treeName, tree, MAX_TREE_SIZE);
/* mostly informational -- no need to fail on error here */
tcon->nativeFileSystem = cifs_strndup_from_ucs(bcc_ptr,
bytes_left, is_unicode,
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