Commit 55162dec authored by Jeff Layton's avatar Jeff Layton Committed by Steve French

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: default avatarJeff Layton <jlayton@redhat.com>
Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
parent 85705524
...@@ -97,7 +97,10 @@ sesInfoFree(struct cifsSesInfo *buf_to_free) ...@@ -97,7 +97,10 @@ sesInfoFree(struct cifsSesInfo *buf_to_free)
kfree(buf_to_free->serverOS); kfree(buf_to_free->serverOS);
kfree(buf_to_free->serverDomain); kfree(buf_to_free->serverDomain);
kfree(buf_to_free->serverNOS); 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->domainName);
kfree(buf_to_free); kfree(buf_to_free);
} }
......
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