From: Jeff Layton Date: Sat, 6 Dec 2008 01:41:21 +0000 (-0500) Subject: cifs: zero out session password before freeing it X-Git-Tag: v2.6.29-rc1~582^2~14 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=55162dec9371a6f6ac63ff546c182cc6144a649e;p=linux-2.6-omap-h63xx.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 9ee3f689c2b..7c3f4b9230d 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); }