From b7ea7fb64069fbdd7e93e9c0218bafc6bc65f9ce Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Thu, 15 Mar 2012 18:23:39 +0200 Subject: Give FreeMem()a help hand regarding the allocated memory size. --- src/corelib/fpg_base.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/corelib') 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; -- cgit v1.2.3-70-g09d2