]> granicus.if.org Git - libexpat/commitdiff
fix potential memory leak in elements.c
authorzhouzhongyuan <zhouzhongyuan@huawei.com>
Thu, 5 Sep 2019 08:17:51 +0000 (16:17 +0800)
committerzhouzhongyuan <zhouzhongyuan@huawei.com>
Thu, 5 Sep 2019 08:17:51 +0000 (16:17 +0800)
expat/examples/elements.c [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index dfc434f..eb0c729
@@ -88,6 +88,7 @@ main(int argc, char *argv[]) {
       fprintf(stderr, "%" XML_FMT_STR " at line %" XML_FMT_INT_MOD "u\n",
               XML_ErrorString(XML_GetErrorCode(parser)),
               XML_GetCurrentLineNumber(parser));
+      XML_ParserFree(parser);
       return 1;
     }
   } while (! done);