mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-19 17:11:41 +02:00
fppkg: fixed mem leak
This commit is contained in:
parent
4d7e71abc0
commit
0d5c1dc9c0
@ -377,12 +377,15 @@ begin
|
||||
Close (TmpFile);
|
||||
{$ELSE USE_SHELL}
|
||||
S:=TProcess.Create(Nil);
|
||||
S.Commandline:=ACompiler+' '+AOptions;
|
||||
S.ShowWindow:=swoHIDE;
|
||||
S.Options:=[poUsePipes];
|
||||
S.execute;
|
||||
Count:=s.output.read(buf,BufSize);
|
||||
S.Free;
|
||||
try
|
||||
S.Commandline:=ACompiler+' '+AOptions;
|
||||
S.ShowWindow:=swoHIDE;
|
||||
S.Options:=[poUsePipes];
|
||||
S.execute;
|
||||
Count:=s.output.read(buf,BufSize);
|
||||
finally
|
||||
S.Free;
|
||||
end;
|
||||
{$ENDIF USE_SHELL}
|
||||
SetLength(Result,Count);
|
||||
Move(Buf,Result[1],Count);
|
||||
|
Loading…
Reference in New Issue
Block a user