From: Jeff Layton Date: Sat, 6 Dec 2008 01:41:21 +0000 (-0500) Subject: cifs: zero out session password before freeing it X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=55162dec9371a6f6ac63ff546c182cc6144a649e;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Signed-off-by: Steve French --- 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) 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); }