Index: libyaml/trunk/src/parser.c
===================================================================
--- libyaml/trunk/src/parser.c	(revision 212)
+++ libyaml/trunk/src/parser.c	(revision 213)
@@ -173,10 +173,12 @@
     assert(event);      /* Non-NULL event object is expected. */
 
+    /* Erase the event object. */
+
+    memset(event, 0, sizeof(yaml_event_t));
+
     /* No events after the end of the stream or error. */
 
     if (parser->stream_end_produced || parser->error ||
             parser->state == YAML_PARSE_END_STATE) {
-        memset(event, 0, sizeof(yaml_event_t));
-
         return 1;
     }
@@ -1319,4 +1321,8 @@
 }
 
+/*
+ * Append a tag directive to the directives stack.
+ */
+
 static int
 yaml_parser_append_tag_directive(yaml_parser_t *parser,
