mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 09:29:26 +02:00
* fixed memory leak in executeprocess for FPC_USE_FPEXEC
git-svn-id: trunk@6826 -
This commit is contained in:
parent
9d6026827d
commit
95474a2d38
@ -911,6 +911,11 @@ Begin
|
|||||||
{ We're in the parent, let's wait. }
|
{ We're in the parent, let's wait. }
|
||||||
result:=WaitProcess(pid); // WaitPid and result-convert
|
result:=WaitProcess(pid); // WaitPid and result-convert
|
||||||
|
|
||||||
|
{$ifdef FPC_USE_FPEXEC}
|
||||||
|
if Comline<>'' Then
|
||||||
|
freemem(cmdline2);
|
||||||
|
{$endif}
|
||||||
|
|
||||||
if (result<0) or (result=127) then
|
if (result<0) or (result=127) then
|
||||||
begin
|
begin
|
||||||
E:=EOSError.CreateFmt(SExecuteProcessFailed,[Path,result]);
|
E:=EOSError.CreateFmt(SExecuteProcessFailed,[Path,result]);
|
||||||
|
Loading…
Reference in New Issue
Block a user