a991cf4
From e7473329c8d79ba3988aa07172290beedcaaf325 Mon Sep 17 00:00:00 2001
a991cf4
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
a991cf4
Date: Tue, 18 Jan 2011 12:10:32 +0000
a991cf4
Subject: [PATCH] free ctxt *after* taking lastError details
a991cf4
a991cf4
---
a991cf4
 unoxml/source/dom/documentbuilder.cxx |    8 ++++----
a991cf4
 1 files changed, 4 insertions(+), 4 deletions(-)
a991cf4
a991cf4
diff --git a/unoxml/source/dom/documentbuilder.cxx b/unoxml/source/dom/documentbuilder.cxx
a991cf4
index bcce353..9e052c3 100644
a991cf4
--- a/unoxml/source/dom/documentbuilder.cxx
a991cf4
+++ b/unoxml/source/dom/documentbuilder.cxx
a991cf4
@@ -314,13 +314,13 @@ namespace DOM
a991cf4
 
a991cf4
     } // extern "C"
a991cf4
 
a991cf4
-    void throwEx(xmlParserCtxtPtr ctxt) {
a991cf4
-        OUString msg = make_error_message(ctxt);
a991cf4
-        xmlFreeParserCtxt(ctxt);
a991cf4
+    void throwEx(xmlParserCtxtPtr ctxt)
a991cf4
+    {
a991cf4
         com::sun::star::xml::sax::SAXParseException saxex;
a991cf4
-        saxex.Message = msg;
a991cf4
+        saxex.Message = make_error_message(ctxt);
a991cf4
         saxex.LineNumber = static_cast<sal_Int32>(ctxt->lastError.line);
a991cf4
         saxex.ColumnNumber = static_cast<sal_Int32>(ctxt->lastError.int2);
a991cf4
+        xmlFreeParserCtxt(ctxt);
a991cf4
         throw saxex;
a991cf4
     }
a991cf4
 
a991cf4
-- 
a991cf4
1.7.3.4
a991cf4