summaryrefslogtreecommitdiff
path: root/src/corelib
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2012-03-15 18:23:39 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2012-03-15 18:23:39 +0200
commitb7ea7fb64069fbdd7e93e9c0218bafc6bc65f9ce (patch)
tree3377d0ee14450b15c333ad2ca7d62e3ed7462214 /src/corelib
parent9b55ac61e1455f2ca5da3d8327f346accccb550e (diff)
downloadfpGUI-b7ea7fb64069fbdd7e93e9c0218bafc6bc65f9ce.tar.xz
Give FreeMem()a help hand regarding the allocated memory size.
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/fpg_base.pas4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/fpg_base.pas b/src/corelib/fpg_base.pas
index de858640..a0cc7690 100644
--- a/src/corelib/fpg_base.pas
+++ b/src/corelib/fpg_base.pas
@@ -2216,11 +2216,11 @@ end;
procedure TfpgImageBase.FreeImage;
begin
if FImageData <> nil then
- FreeMem(FImageData);
+ FreeMem(FImageData, FImageDataSize);
FImageData := nil;
FImageDataSize := 0;
if FMaskData <> nil then
- FreeMem(FMaskData);
+ FreeMem(FMaskData, FMaskDataSize);
FMaskData := nil;
FMaskDataSize := 0;
FMasked := False;