You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by al...@apache.org on 2013/10/21 12:41:33 UTC

svn commit: r1534085 - /openoffice/branches/alg/sysdepgs/main/vcl/win/source/gdi/salgdi_gdiplus.cxx

Author: alg
Date: Mon Oct 21 10:41:33 2013
New Revision: 1534085

URL: http://svn.apache.org/r1534085
Log:
i123478 Secure mem freeing for BitmapBuffer class

Modified:
    openoffice/branches/alg/sysdepgs/main/vcl/win/source/gdi/salgdi_gdiplus.cxx

Modified: openoffice/branches/alg/sysdepgs/main/vcl/win/source/gdi/salgdi_gdiplus.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/sysdepgs/main/vcl/win/source/gdi/salgdi_gdiplus.cxx?rev=1534085&r1=1534084&r2=1534085&view=diff
==============================================================================
--- openoffice/branches/alg/sysdepgs/main/vcl/win/source/gdi/salgdi_gdiplus.cxx (original)
+++ openoffice/branches/alg/sysdepgs/main/vcl/win/source/gdi/salgdi_gdiplus.cxx Mon Oct 21 10:41:33 2013
@@ -298,6 +298,9 @@ Gdiplus::Bitmap* GdiPlusBitmapBufferNode
 
     if(pExtraRGB)
     {
+        // shockingly, BitmapBuffer does not free the memory it is controlling
+        // in it's destructor, this *has to be done handish*. Doing it here now
+        delete[] pExtraRGB->mpBits;
         delete pExtraRGB;
     }
     else
@@ -436,6 +439,9 @@ Gdiplus::Bitmap* GdiPlusBitmapBufferNode
 
     if(pExtraA)
     {
+        // shockingly, BitmapBuffer does not free the memory it is controlling
+        // in it's destructor, this *has to be done handish*. Doing it here now
+        delete[] pExtraA->mpBits;
         delete pExtraA;
     }
     else
@@ -450,6 +456,9 @@ Gdiplus::Bitmap* GdiPlusBitmapBufferNode
 
     if(pExtraRGB)
     {
+        // shockingly, BitmapBuffer does not free the memory it is controlling
+        // in it's destructor, this *has to be done handish*. Doing it here now
+        delete[] pExtraRGB->mpBits;
         delete pExtraRGB;
     }
     else