IPC 96: Section 96 of the Indian Penal Code

Things done in private defence

Nothing is an offence which is done in the exercise of the right of private defence.