Sunan Ibn Majah, Book 21, Hadith 2797 (In-Book)

Mu'adh bin Jabal, Abu Ubaidah bin Jararah, Ubadah bin Samit and Shaddad bin Aws narrated that the Messenger of Allah said: “If a woman kills someone deliberately, she should not be killed until she delivers what is in her womb, if she is pregnant, and until the child's sponsorship is guaranteed. And if a woman commits illegal sex, she should not be stoned until she delivers what is in her womb and until her child's sponsorship is guaranteed.”

حَدَّثَنَا مُحَمَّدُ بْنُ يَحْيَى، حَدَّثَنَا أَبُو صَالِحٍ، عَنِ ابْنِ لَهِيعَةَ، عَنِ ابْنِ أَنْعُمٍ، عَنْ عُبَادَةَ بْنِ نُسَىٍّ، عَنْ عَبْدِ الرَّحْمَنِ بْنِ غَنْمٍ، حَدَّثَنَا مُعَاذُ بْنُ جَبَلٍ، وَأَبُو عُبَيْدَةَ بْنُ الْجَرَّاحِ وَعُبَادَةُ بْنُ الصَّامِتِ وَشَدَّادُ بْنُ أَوْسٍ أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ ‏ "‏ الْمَرْأَةُ إِذَا قَتَلَتْ عَمْدًا لاَ تُقْتَلُ حَتَّى تَضَعَ مَا فِي بَطْنِهَا إِنْ كَانَتْ حَامِلاً وَحَتَّى تُكَفِّلَ وَلَدَهَا وَإِنْ زَنَتْ لَمْ تُرْجَمْ حَتَّى تَضَعَ مَا فِي بَطْنِهَا وَحَتَّى تُكَفِّلَ وَلَدَهَا ‏" ‏ ‏.‏

sunnah.com