From: Quang Le Date: Thu, 28 Sep 2023 17:44:13 +0000 (+0700) Subject: fs/smb/client: Reset password pointer to NULL X-Git-Tag: v6.6.17~3835^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e6e43b8aa7cd3c3af686caf0c2e11819a886d705;p=platform%2Fkernel%2Flinux-rpi.git fs/smb/client: Reset password pointer to NULL Forget to reset ctx->password to NULL will lead to bug like double free Cc: stable@vger.kernel.org Cc: Willy Tarreau Reviewed-by: Namjae Jeon Signed-off-by: Quang Le Signed-off-by: Steve French --- diff --git a/fs/smb/client/fs_context.c b/fs/smb/client/fs_context.c index e45ce31..a3493da 100644 --- a/fs/smb/client/fs_context.c +++ b/fs/smb/client/fs_context.c @@ -1541,6 +1541,7 @@ static int smb3_fs_context_parse_param(struct fs_context *fc, cifs_parse_mount_err: kfree_sensitive(ctx->password); + ctx->password = NULL; return -EINVAL; }