diff options
Diffstat (limited to 'server/src/saxparser.cc')
-rw-r--r-- | server/src/saxparser.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/server/src/saxparser.cc b/server/src/saxparser.cc index e0d849a..2eabf38 100644 --- a/server/src/saxparser.cc +++ b/server/src/saxparser.cc @@ -68,6 +68,11 @@ SAXParser::SAXParser() XML_SetElementHandler(p, start_hndl, end_hndl); } +SAXParser::~SAXParser() +{ + XML_ParserFree(p); +} + int SAXParser::parse() { char buf[32]; @@ -77,7 +82,7 @@ int SAXParser::parse() len = readData(buf, sizeof(buf) - 1); if (! XML_Parse(p, buf, len, len == 0)) { fprintf(stderr, "Parse error at line %d:\n%s\n", - XML_GetCurrentLineNumber(p), + (int)XML_GetCurrentLineNumber(p), XML_ErrorString(XML_GetErrorCode(p))); return -1; } |