We study the exact entanglement dynamics of two atoms in a lossy resonator. Besides discussing the steady-state entanglement, we show that in the strong coupling regime the system-reservoir correlations induce entanglement revivals and oscillations and propose a strategy to fight against the deterioration of the entanglement using the quantum Zeno effect.