From: Paulo Alcantara <palcantara@suse.de>
To: kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] cifs: Use kzfree() to free password
Date: Thu, 20 Dec 2018 13:01:13 +0000 [thread overview]
Message-ID: <87lg4kxsh2.fsf@paulo.ac> (raw)
In-Reply-To: <20181220113243.GA20171@kadam>
Dan Carpenter <dan.carpenter@oracle.com> writes:
> We should zero out the password before we free it.
>
> Fixes: 3d6cacbb5310 ("cifs: Add DFS cache routines")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> fs/cifs/dfs_cache.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/cifs/dfs_cache.c b/fs/cifs/dfs_cache.c
> index f74567788396..006333146a6d 100644
> --- a/fs/cifs/dfs_cache.c
> +++ b/fs/cifs/dfs_cache.c
> @@ -1130,7 +1130,7 @@ static int dup_vol(struct smb_vol *vol, struct smb_vol *new)
> err_free_unc:
> kfree(new->UNC);
> err_free_password:
> - kfree(new->password);
> + kzfree(new->password);
> err_free_username:
> kfree(new->username);
> kfree(new);
> --
> 2.17.1
Reviewed-by: Paulo Alcantara <palcantara@suse.de>
Thanks!
Paulo
next prev parent reply other threads:[~2018-12-20 13:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-20 11:32 [PATCH] cifs: Use kzfree() to free password Dan Carpenter
2018-12-20 13:01 ` Paulo Alcantara [this message]
2018-12-20 16:58 ` Steve French
2018-12-21 6:19 ` Steve French
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lg4kxsh2.fsf@paulo.ac \
--to=palcantara@suse.de \
--cc=kernel-janitors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.