summaryrefslogtreecommitdiffstats
path: root/unoxml
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-01-18 12:10:32 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-01-18 12:10:32 +0000
commitca5d4067c9997c6f7cffee0d6bda43eb3e378126 (patch)
treeb23dda192c08d77a8b1958dc0d08e9216f98bcb9 /unoxml
parentUse the foolproof checked macro for this (diff)
downloadcore-ca5d4067c9997c6f7cffee0d6bda43eb3e378126.tar.gz
core-ca5d4067c9997c6f7cffee0d6bda43eb3e378126.zip
free ctxt *after* taking lastError details
Diffstat (limited to 'unoxml')
-rw-r--r--unoxml/source/dom/documentbuilder.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/unoxml/source/dom/documentbuilder.cxx b/unoxml/source/dom/documentbuilder.cxx
index 1c7f3140a33e..6c9d52b955b9 100644
--- a/unoxml/source/dom/documentbuilder.cxx
+++ b/unoxml/source/dom/documentbuilder.cxx
@@ -314,13 +314,13 @@ namespace DOM
} // extern "C"
- void throwEx(xmlParserCtxtPtr ctxt) {
- OUString msg = make_error_message(ctxt);
- xmlFreeParserCtxt(ctxt);
+ void throwEx(xmlParserCtxtPtr ctxt)
+ {
com::sun::star::xml::sax::SAXParseException saxex;
- saxex.Message = msg;
+ saxex.Message = make_error_message(ctxt);
saxex.LineNumber = static_cast<sal_Int32>(ctxt->lastError.line);
saxex.ColumnNumber = static_cast<sal_Int32>(ctxt->lastError.int2);
+ xmlFreeParserCtxt(ctxt);
throw saxex;
}