libreoffice/0001-free-ctxt-after-taking-lastError-details.patch

35 lines
1.1 KiB
Diff

From e7473329c8d79ba3988aa07172290beedcaaf325 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Tue, 18 Jan 2011 12:10:32 +0000
Subject: [PATCH] free ctxt *after* taking lastError details
---
unoxml/source/dom/documentbuilder.cxx | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/unoxml/source/dom/documentbuilder.cxx b/unoxml/source/dom/documentbuilder.cxx
index bcce353..9e052c3 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;
}
--
1.7.3.4