aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/misc.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-12-28 15:37:14 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-12-28 15:37:14 -0500
commit54a696bd07c14d3b1192d03ce7269bc59b45209a (patch)
tree2da3a0ce28e08bde17a0fba8bb807480849cf410 /fs/cifs/misc.c
parent1d248b2593e92db6c51ca07235985a95c625a93f (diff)
parent359d67d6ad054ae11ad459665fdfb883aca87782 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6: (31 commits) [CIFS] Remove redundant test [CIFS] make sure that DFS pathnames are properly formed Remove an already-checked error condition in SendReceiveBlockingLock Streamline SendReceiveBlockingLock: Use "goto out:" in an error condition Streamline SendReceiveBlockingLock: Use "goto out:" in an error condition [CIFS] Streamline SendReceive[2] by using "goto out:" in an error condition Slightly streamline SendReceive[2] Check the return value of cifs_sign_smb[2] [CIFS] Cleanup: Move the check for too large R/W requests [CIFS] Slightly simplify wait_for_free_request(), remove an unnecessary "else" branch Simplify allocate_mid() slightly: Remove some unnecessary "else" branches [CIFS] In SendReceive, move consistency check out of the mutexed region cifs: store password in tcon cifs: have calc_lanman_hash take more granular args cifs: zero out session password before freeing it cifs: fix wait_for_response to time out sleeping processes correctly [CIFS] Can not mount with prefixpath if root directory of share is inaccessible [CIFS] various minor cleanups pointed out by checkpatch script [CIFS] fix typo [CIFS] remove sparse warning ... Fix trivial conflict in fs/cifs/cifs_fs_sb.h due to comment changes for the CIFS_MOUNT_xyz bit definitions between cifs updates and security updates.
Diffstat (limited to 'fs/cifs/misc.c')
-rw-r--r--fs/cifs/misc.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c
index 8a82d076450b..4c89c572891a 100644
--- a/fs/cifs/misc.c
+++ b/fs/cifs/misc.c
@@ -97,7 +97,10 @@ sesInfoFree(struct cifsSesInfo *buf_to_free)
97 kfree(buf_to_free->serverOS); 97 kfree(buf_to_free->serverOS);
98 kfree(buf_to_free->serverDomain); 98 kfree(buf_to_free->serverDomain);
99 kfree(buf_to_free->serverNOS); 99 kfree(buf_to_free->serverNOS);
100 kfree(buf_to_free->password); 100 if (buf_to_free->password) {
101 memset(buf_to_free->password, 0, strlen(buf_to_free->password));
102 kfree(buf_to_free->password);
103 }
101 kfree(buf_to_free->domainName); 104 kfree(buf_to_free->domainName);
102 kfree(buf_to_free); 105 kfree(buf_to_free);
103} 106}
@@ -129,6 +132,10 @@ tconInfoFree(struct cifsTconInfo *buf_to_free)
129 } 132 }
130 atomic_dec(&tconInfoAllocCount); 133 atomic_dec(&tconInfoAllocCount);
131 kfree(buf_to_free->nativeFileSystem); 134 kfree(buf_to_free->nativeFileSystem);
135 if (buf_to_free->password) {
136 memset(buf_to_free->password, 0, strlen(buf_to_free->password));
137 kfree(buf_to_free->password);
138 }
132 kfree(buf_to_free); 139 kfree(buf_to_free);
133} 140}
134 141