[Libreoffice-commits] core.git: 2 commits - filter/source vcl/source

Caolán McNamara caolanm at redhat.com
Mon Apr 28 12:51:28 PDT 2014


 filter/source/graphicfilter/ieps/ieps.cxx |    4 ++--
 vcl/source/outdev/outdev.cxx              |    7 +++----
 2 files changed, 5 insertions(+), 6 deletions(-)

New commits:
commit 2ac1551397222276f6c3a0cfbd4544c6aafce093
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Apr 28 20:47:23 2014 +0100

    mem leak in OutDevStackState
    
    regression since cf3c6cb40f99fa1761a6af3d7447a899b9447868
    
    Change-Id: I74900c93a1aee87e7ae0a6fa58905f751a528756

diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx
index 5af2be3..62f31d6 100644
--- a/vcl/source/outdev/outdev.cxx
+++ b/vcl/source/outdev/outdev.cxx
@@ -206,6 +206,7 @@ OutputDevice::~OutputDevice()
             mpOutDevStateStack->pop_back();
         }
     }
+    delete mpOutDevStateStack;
 
     // release the active font instance
     if( mpFontEntry )
@@ -213,11 +214,9 @@ OutputDevice::~OutputDevice()
 
     // remove cached results of GetDevFontList/GetDevSizeList
     // TODO: use smart pointers for them
-    if( mpGetDevFontList )
-        delete mpGetDevFontList;
+    delete mpGetDevFontList;
 
-    if( mpGetDevSizeList )
-        delete mpGetDevSizeList;
+    delete mpGetDevSizeList;
 
     // release ImplFontCache specific to this OutputDevice
     // TODO: refcount ImplFontCache
commit 4d88c6dee6d57fa9c366b67624842aefa429f527
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Apr 28 20:45:19 2014 +0100

    Related: fdo#64161 pstoedit not writing file until its closed
    
    there's more to this than that, but at least its consistent this way and not
    differing per person. Its a bit unfortunate that pstoedit can't render the text
    in this example either though.
    
    Change-Id: I6f6bb7f83ed23dfc0f6b5c5f2b00753fa7190a8d

diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx
index 1a436cd..ddabb5f 100644
--- a/filter/source/graphicfilter/ieps/ieps.cxx
+++ b/filter/source/graphicfilter/ieps/ieps.cxx
@@ -235,14 +235,14 @@ static bool RenderAsEMF(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, Graphic &r
         osl_closeFile(pOut);
     }
     if (pErr) osl_closeFile(pErr);
+    osl_joinProcess(aProcess);
+    osl_freeProcessHandle(aProcess);
     if (nCount == nBytesRead && bEMFSupported)
     {
         SvFileStream aFile(output, STREAM_READ);
         if (GraphicConverter::Import(aFile, rGraphic, CVT_EMF) == ERRCODE_NONE)
             bRet = true;
     }
-    osl_joinProcess(aProcess);
-    osl_freeProcessHandle(aProcess);
     return bRet;
 }
 


More information about the Libreoffice-commits mailing list