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