openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1534085 - /openoffice/branches/alg/sysdepgs/main/vcl/win/source/gdi/salgdi_gdiplus.cxx
Date Mon, 21 Oct 2013 10:41:33 GMT
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



Mime
View raw message