Fix leak of the event