The Prophet ﷺ said, "There is no vow binding upon a man regarding what he does not own."
أن النبي ﷺ قال: ليس على رجل نذر فيما لا يملك.
Muslim narrated it in the Book of Oaths (110-176), and this is his wording, and Bukhari narrated it in the Book of Manners (6047), both from the hadith of Yahya bin Abu Kathir, from Abu Qilaba, that Thabit bin Dahhak, who was one of the companions who gave the pledge under the tree, told him that the Messenger of Allah ﷺ said, and then he related the hadith in full. Except that Bukhari did not mention, "A man has no vow to fulfill regarding what he does not possess." His statement, "regarding what he does not possess," means that his vow does not take effect at all.