From 539f2cd7f095b616b6452f1fcc4aa3635d99fb57 Mon Sep 17 00:00:00 2001 From: Karoly Balogh Date: Sun, 26 Dec 2021 20:35:11 +0100 Subject: [PATCH] amunits: in agraphics legacy support, use ExecFreeMem (OS call) instead of FreeMem (RTL call) to free the Bitmap which was created using ExecAllocMem --- packages/amunits/src/coreunits/agraphics.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/amunits/src/coreunits/agraphics.pas b/packages/amunits/src/coreunits/agraphics.pas index e8a9174e90..e96a3ab7c9 100644 --- a/packages/amunits/src/coreunits/agraphics.pas +++ b/packages/amunits/src/coreunits/agraphics.pas @@ -2605,7 +2605,7 @@ begin for i := 0 to Depth - 1 do if MyBM^.Planes[i] <> nil then FreeRaster(MyBM^.Planes[i], Width, Height); - FreeMem(MyBM, SizeOf(TBitMap)); + ExecFreeMem(MyBM, SizeOf(TBitMap)); end; end;