events - fix the double free() case.