diff options
author | Jeff Layton <jlayton@redhat.com> | 2009-07-20 13:40:52 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-07-30 14:39:24 -0700 |
commit | 6b5600f321f51cd409d05f475128d40fc7241a2d (patch) | |
tree | 06161aa5534cfeb7563dbfd018909d5db3f62131 /fs | |
parent | 9d33821d65cdad2af0461f3a6268125cc8a33052 (diff) |
cifs: free nativeFileSystem field before allocating a new one
commit 90a98b2f3f3647fb17667768a348b2b219f2a9f7 upstream.
...otherwise, we'll leak this memory if we have to reconnect (e.g. after
network failure).
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/cifs/connect.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 4aa81a507b7..1dc14f219ad 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -2745,6 +2745,7 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses, strncpy(tcon->treeName, tree, MAX_TREE_SIZE); /* mostly informational -- no need to fail on error here */ + kfree(tcon->nativeFileSystem); tcon->nativeFileSystem = cifs_strndup_from_ucs(bcc_ptr, bytes_left, is_unicode, nls_codepage); |