Sunan Ibn Majah, Book 27, Hadith 38 (Ibn Majah 3201)
It was narrated that Abu Sa’eed said:
“We asked the Messenger of Allah (ﷺ) about the fetus. He said: ‘Eat it if you wish, for it is considered legally slaughtered with the slaughtering of its mother.’”