Protect a possible doublefree