Mishkat al-Masabih
He said he separated a slave girl from her child, but when the Prophet (ﷺ) forbade him to do that he cancelled the transaction. Abu Dawud transmitted it with a break in the isnad.
وَعَنْهُ أَنَّهُ فَرَّقَ بَيْنَ جَارِيَةٍ وَوَلَدِهَا فَنَهَاهُ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ عَنْ ذَلِكَ فردَّ البَيعَ. رَوَاهُ أَبُو دَاوُد مُنْقَطِعًا
Reference