It was narrated from Samurah bin Jundub that the Prophet (ﷺ) said: “Whoever becomes the master of a Mahram relative (with whom marriage is not lawful), he becomes free.”
It was narrated from Ibn`Umar that the Messenger of Allah (ﷺ) said: “Whoever becomes the master of a Mahram relative, he becomes free.”