rgw: fix xml parser internal structure leak

This commit is contained in:
Yehuda Sadeh 2011-12-19 13:38:58 -08:00
parent 3a8af0f724
commit 27da89f436

View File

@ -216,7 +216,11 @@ bool RGWXMLParser::parse(const char *_buf, int len, int done)
fprintf(stderr, "Parse error at line %d:\n%s\n",
(int)XML_GetCurrentLineNumber(p),
XML_ErrorString(XML_GetErrorCode(p)));
return false;
success = false;
}
if (done || !success)
XML_ParserFree(p);
return success;
}