I would simply let the player walk when he isn't close to the clicked mouse position, then he automatically stops when he is close to that position.
When you click outside the players range, then the player automatically will walk to that new position.
No need of any variable, simply setting the vector of the position by mouse click and the players distance are needed to determine whether he walks or not.