summaryrefslogtreecommitdiff
path: root/src/corelib
diff options
context:
space:
mode:
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;