diff options
author | Jeff Layton <jlayton@redhat.com> | 2008-12-05 20:41:21 -0500 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2008-12-25 21:29:11 -0500 |
commit | 55162dec9371a6f6ac63ff546c182cc6144a649e (patch) | |
tree | b01c6f54067666c6c809bf71990a82b3ddc842f2 /fs/cifs/misc.c | |
parent | 85705524258f93a6086c3247a58f34a661b82b3d (diff) |
cifs: zero out session password before freeing it
cifs: zero out session password before freeing it
...just to be on the safe side.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/misc.c')
-rw-r--r-- | fs/cifs/misc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c index 9ee3f689c2b0..7c3f4b9230d7 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 | } |