Maliks Muwatta Book 24, Hadith Number 3.

Section : Methods of Slaughter Permitted in Necessity.

Yahya related to me from Malik from Zayd ibn Aslam from Ata ibn Yasar that a man from the Ansar of the tribe of Banu Haritha was herding a pregnant she-camel at Uhud. It was about to die, so he slaughtered it with a sharp stake. The Messenger of Allah was asked about that, and he said, “There is no harm in it, eat it.”