Index: main/xmldoc.c =================================================================== --- main/xmldoc.c (revision 395932) +++ main/xmldoc.c (working copy) @@ -755,6 +755,7 @@ if ((paramtype = ast_xml_get_attribute(node, "required"))) { if (!ast_true(paramtype)) { optmidnode = 1; + ast_xml_free_attr(paramtype); break; } ast_xml_free_attr(paramtype);