Muwatta Malik, Book 31, Hadith 5 (USC-MSA)

Yahya related to me from Malik from Ibn Shihab that Ubaydullah ibn Abdullah ibn Utba ibn Masud told him that Abdullah ibn Masud bought a slave-girl from his wife, Zaynab Ath Thaqafiyya. She made a condition to him, that if he bought her, she could always buy her back for the price that he paid. Abdullah ibn Masud asked Umar ibn al- Khattab about that and Umar ibn al-Khattab said, "Do not go near her while anyone has a condition concerning her over you."

حَدَّثَنِي يَحْيَى، عَنْ مَالِكٍ، عَنِ ابْنِ شِهَابٍ، أَنَّ عُبَيْدَ اللَّهِ بْنَ عَبْدِ اللَّهِ بْنِ عُتْبَةَ بْنِ مَسْعُودٍ، أَخْبَرَهُ أَنَّ عَبْدَ اللَّهِ بْنَ مَسْعُودٍ ابْتَاعَ جَارِيَةً مِنِ امْرَأَتِهِ زَيْنَبَ الثَّقَفِيَّةِ وَاشْتَرَطَتْ عَلَيْهِ أَنَّكَ إِنْ بِعْتَهَا فَهِيَ لِي بِالثَّمَنِ الَّذِي تَبِيعُهَا بِهِ فَسَأَلَ عَبْدُ اللَّهِ بْنُ مَسْعُودٍ عَنْ ذَلِكَ عُمَرَ بْنَ الْخَطَّابِ فَقَالَ عُمَرُ بْنُ الْخَطَّابِ لاَ تَقْرَبْهَا وَفِيهَا شَرْطٌ لأَحَدٍ ‏.‏

sunnah.com

also referenced under: Book 31, Hadith 1297 (In-Book)