summaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2008-12-05 20:41:21 -0500
committerSteve French <sfrench@us.ibm.com>2008-12-26 02:29:11 +0000
commit55162dec9371a6f6ac63ff546c182cc6144a649e (patch)
treeb01c6f54067666c6c809bf71990a82b3ddc842f2 /fs/cifs
parent85705524258f93a6086c3247a58f34a661b82b3d (diff)
downloadop-kernel-dev-55162dec9371a6f6ac63ff546c182cc6144a649e.zip
op-kernel-dev-55162dec9371a6f6ac63ff546c182cc6144a649e.tar.gz
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')
-rw-r--r--fs/cifs/misc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c
index 9ee3f68..7c3f4b9 100644
--- a/fs/cifs/misc.c
+++ b/fs/cifs/misc.c
@@ -97,7 +97,10 @@ sesInfoFree(struct cifsSesInfo *buf_to_free)
kfree(buf_to_free->serverOS);
kfree(buf_to_free->serverDomain);
kfree(buf_to_free->serverNOS);
- kfree(buf_to_free->password);
+ if (buf_to_free->password) {
+ memset(buf_to_free->password, 0, strlen(buf_to_free->password));
+ kfree(buf_to_free->password);
+ }
kfree(buf_to_free->domainName);
kfree(buf_to_free);
}
OpenPOWER on IntegriCloud