Sayyiduna Mu'adh bin Jabal (may Allah be pleased with him) says that the Messenger of Allah (peace and blessings be upon him) was asked about a man who says to his wife: 'Anti taliq in sha' Allah' (You are divorced if Allah wills). He (peace and blessings be upon him) said: "His exception stands." The narrator says: That man asked: If someone says to his slave: 'Anta hurr in sha' Allah' (You are free if Allah wills)? He (peace and blessings be upon him) said: "He becomes free, because Allah likes freeing (slaves), while He does not will divorce."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الخلع والطلاق / 15121