Ibn-e-Maja 2516 – Hadith About Maria Qibtiyya (ra) And Ibrahim Ibn Muhammad (ra)
This is an extremely weak narration. One narrator Hussain bin Abdullah in this chain is Matruk ( Abandoned for Hadith purposes ). It was narrated by Ibn Majah and al-Hakim with a weak chain of transmission, and one group preferred its transmission to Sayyiduna Umar (rta) ( as his saying instead ). However, when seen in the light of another weak narration of Ibn-e-Maja 2515 ( https://sunnah.com/ibnmajah:2515 ) on a simialr topic, it becomes clear that if Prophet (sws) ever said something like this, it was also to raise standards of slaves in the society by encouraging Muslims that after giving birth to their child, the slave-girl earns the right to be free after the death of the owner.