[Libreoffice-commits] libvisio.git: src/lib

David Tardon dtardon at redhat.com
Tue Jul 21 12:49:32 PDT 2015


 src/lib/VSDParser.cpp |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

New commits:
commit 23c914ca9e0e913ac4fde07522074f4e1f47b7ee
Author: David Tardon <dtardon at redhat.com>
Date:   Tue Jul 21 21:49:14 2015 +0200

    plug a leak
    
    Change-Id: Iece1e905a696df09b75a3a90483f76c52d6396d5

diff --git a/src/lib/VSDParser.cpp b/src/lib/VSDParser.cpp
index 6ce32eb..9bdb7c6 100644
--- a/src/lib/VSDParser.cpp
+++ b/src/lib/VSDParser.cpp
@@ -163,12 +163,9 @@ void libvisio::VSDParser::parseMetaData() try
     delete sumaryInfo;
   }
 
-  librevenge::RVNGInputStream *docSumaryInfo = m_container->getSubStreamByName("\005DocumentSummaryInformation");
-  if (docSumaryInfo)
-  {
-    metaData.parse(docSumaryInfo);
-    delete docSumaryInfo;
-  }
+  RVNGInputStreamPtr_t docSumaryInfo(m_container->getSubStreamByName("\005DocumentSummaryInformation"));
+  if (bool(docSumaryInfo))
+    metaData.parse(docSumaryInfo.get());
 
   m_container->seek(0, librevenge::RVNG_SEEK_SET);
   metaData.parseTimes(m_container);


More information about the Libreoffice-commits mailing list