Commit e6e43b8a authored by Quang Le's avatar Quang Le Committed by Steve French
Browse files

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 <w@1wt.eu>
Reviewed-by: default avatarNamjae Jeon <linkinjeon@kernel.org>
Signed-off-by: default avatarQuang Le <quanglex97@gmail.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 6465e260
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
}