Hadithcore
Mishkat al-Masabih, 3201

She said that Barira became free when she was with Mughith and God’s Messenger gave her her choice saying, “If he has intercourse with you, you will not be allowed to exercise choice.” Abu Dawud transmitted it.

وَعَنْهَا: أَنْ بَرِيرَةَ عَتَقَتْ وَهِيَ عِنْدَ مُغِيثٍ فَخَيَّرَهَا رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ وَقَالَ لَهَا: «إِنْ قَرِبَكِ فَلَا خِيَارَ لَكِ» . رَوَاهُ أَبُو دَاوُدَ وَهَذَا الْبَابُ خَالٍ عَنِ الْفَصْلِ الثَّالِثِ

References1 variant
In-Book Reference
Book 13, Hadith 119