As per Holy Quran if a Muslim kills a Muslim by mistake, there is an escape, that he can repent, can ask for forgiveness from the near ones of killed, and after he frees one Muslim slave.
What is the punishment if a Muslim kills a non-Muslim by mistake?
It is not for a believer to kill a believer except (that it be) by mistake, and whosoever kills a believer by mistake, (it is ordained that) he must set free a believing slave and a compensation (blood money, i.e Diya) be given to the deceased's family, unless they remit it. If the deceased belonged to a people at war with you and he was a believer; the freeing of a believing slave (is prescribed), and if he belonged to a people with whom you have a treaty of mutual alliance, compensation (blood money - Diya) must be paid to his family, and a believing slave must be freed. And whoso finds this (the penance of freeing a slave) beyond his means, he must fast for two consecutive months in order to seek repentance from Allâh. And Allâh is Ever AllKnowing, AllWise. (4:92)