Sayyiduna Imran bin Husayn (may Allah be pleased with him) narrates from the Prophet (peace and blessings be upon him) that he (peace and blessings be upon him) said: "There is no vow in disobedience, nor in what the son of Adam does not own."
Imam al-Shafi'i (may Allah have mercy on him) said: In the narration of Abd al-Wahhab al-Thaqafi with this chain: A woman of the Ansar fled on a she-camel belonging to the Prophet (peace and blessings be upon him) and vowed that if Allah saved her on it, she would slaughter it. The Prophet (peace and blessings be upon him) said these words and took his she-camel.
Imam al-Shafi'i (may Allah have mercy on him) said: He (peace and blessings be upon him) did not order her to slaughter one like it, nor to give expiation.
Imam al-Shafi'i (may Allah have mercy on him) said: So we hold that whoever vows, as an act of piety, to slaughter someone else's property, the vow falls away from him; and whoever vows what he cannot do in any way, the vow falls away from him, because he has no power to do it, so it is like what he does not own.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الأيمان / 20057