Vasiṣhṭh Smṛiti (verse 3.19) under six circumstances it is ***acceptable to kill;*** in order to protect themselves from such enemies who have: set fire to their property, tried to poison them, conspired to murder, loot their wealth, ***kidnap or dishonor their women***, or seize their kingdom.

> इमं हि सर्ववर्णानां पश्यन्तो धर्ममुत्तमम् ।
> 
> यतन्ते रक्षितुं भार्यां भर्तारो दुर्बला अपि ॥ ६ 
> 
> स्वां प्रसूतिं चरित्रं च कुलमात्मानमेव च ।
> 
> स्वं च ***धर्मं प्रयत्नेन जायां रक्षन् हि रक्षति*** ॥ ७ 
> 
> Looking upon this as the highest duty of all castes, even weak
> husbands strive to guard their wives—(6).
> 
> He who carefully protects his wipe preserves his offspring, his
> character, his family, his own self, and ***also his dharma***.—(7).
> 
>  
> 
> Manusmriti ch 9

So, it's duty(dharma)of husband to save wife and it's always better to follow dharma even with faults till last breath


Bhagavad Gita: Chapter 3, Verse 35

श्रेयान्स्वधर्मो विगुण: परधर्मात्स्वनुष्ठितात् |

स्वधर्मे निधनं श्रेय: परधर्मो भयावह: || 35||

It is far better to perform one’s natural prescribed duty, though tinged with faults, than to perform another’s prescribed duty, though perfectly. In fact, it is ***preferable to die in the discharge of one’s duty, than to follow the path of another, which is fraught with danger.***