Fix double free in retry