Safeguard Fine-Tuned LLMs Through Pre- and Post-Tuning Model Merging