mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 13:59:55 +02:00
* Fix memleak
This commit is contained in:
parent
04e715445f
commit
dcadafa1b8
@ -64,6 +64,7 @@ Var
|
||||
Obj : TJSONObject absolute D;
|
||||
|
||||
begin
|
||||
D:=Nil;
|
||||
F:=TFileStream.Create(aFileName,fmOpenRead or fmShareDenyWrite);
|
||||
try
|
||||
D:=GetJSON(F);
|
||||
@ -73,6 +74,7 @@ begin
|
||||
Msg.Body:=Obj.Get('body',Msg.Body);
|
||||
Msg.Image:=Obj.Get('image',Msg.Image);
|
||||
finally
|
||||
D.Free;
|
||||
F.Free;
|
||||
end;
|
||||
end;
|
||||
@ -80,7 +82,6 @@ end;
|
||||
|
||||
procedure TFCMApplication.ConfigureMessage(Msg : TNotificationMessage);
|
||||
|
||||
|
||||
begin
|
||||
if HasOption('m','message') then
|
||||
LoadMessageFromFile(Msg,GetOptionValue('m','message'));
|
||||
@ -90,7 +91,6 @@ begin
|
||||
Msg.Body:=GetoptionValue('b','body');
|
||||
if HasOption('i','image') then
|
||||
Msg.Body:=GetoptionValue('i','image');
|
||||
|
||||
end;
|
||||
|
||||
procedure TFCMApplication.DoHandleNewToken(Sender: TObject; const aToken: TBearerToken);
|
||||
|
Loading…
Reference in New Issue
Block a user