Yahya said that he had heard Malik say, "The meaning of the statement of the Prophet (ﷺ) 'Whoever vows to disobey Allah, let him not disobey Him' is that for instance a man who vows that, if he speaks to such-and-such a person, he will walk to Syria, Egypt, or any other such things which are not considered as ibada, is not under any obligation by any of that, even if he did speak to the man or did break whatever it was he swore, because Allah does not demand obedience in such things. He should only fulfill those things in which there is obedience to Allah."
22:5 Rashness in Oaths
Arabic : Book 22, Hadith 1020