From 44b3df4304a69f52c641e0792b5b1186a7e6d2f7 Mon Sep 17 00:00:00 2001
From: Fons Rademakers <Fons.Rademakers@cern.ch>
Date: Mon, 29 Jul 2013 17:21:48 +0200
Subject: [PATCH] fix memory leak.

From Sergei Linev.
---
 io/xml/src/TXMLEngine.cxx | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/io/xml/src/TXMLEngine.cxx b/io/xml/src/TXMLEngine.cxx
index 1bd040ac1c0..d878f0aaf05 100644
--- a/io/xml/src/TXMLEngine.cxx
+++ b/io/xml/src/TXMLEngine.cxx
@@ -1,4 +1,4 @@
-// @(#)root/xml:$Id$
+// @(#)root/xml:$Id: 1bd040ac1c03c58bcad15b5206d602680a831c0a $
 // Author: Sergey Linev  10.05.2004
 
 /*************************************************************************
@@ -98,6 +98,7 @@ public:
    {
       if (fCurrent!=fBuf) OutputCurrent();
       delete fOut;
+      free(fBuf);
    }
 
    void OutputCurrent()
@@ -273,14 +274,14 @@ public:
 
    Bool_t SkipSpaces(Bool_t tillendl = kFALSE)
    {
-      do {
+      while (fCurrent<fMaxAddr) {
          char symb = *fCurrent;
          if ((symb>26) && (symb!=' ')) return kTRUE;
 
          if (!ShiftCurrent()) return kFALSE;
 
          if (tillendl && (symb==10)) return kTRUE;
-      } while (fCurrent<fMaxAddr);
+      }
       return kFALSE;
    }
 
-- 
GitLab