Move event_debug_note_teardown_ before mm_free. This isn't a bug, since only the pointer value of ev was used, but it's probably best not to tempt fate. Found by coverity.