Tidy up attribute prefix bindings on error (fixes #17)

This commit is contained in:
Rhodri James 2017-04-11 12:44:25 +01:00 committed by Sebastian Pipping
parent 16f87daae5
commit b47dbc9745

View File

@ -2529,8 +2529,10 @@ doContent(XML_Parser parser,
return XML_ERROR_NO_MEMORY;
poolFinish(&tempPool);
result = storeAtts(parser, enc, s, &name, &bindings);
if (result)
if (result != XML_ERROR_NONE) {
freeBindings(parser, bindings);
return result;
}
poolFinish(&tempPool);
if (startElementHandler) {
startElementHandler(handlerArg, name.str, (const XML_Char **)atts);