diff --git a/rtl/unix/sysutils.pp b/rtl/unix/sysutils.pp index f2c5d7caf8..15578698df 100644 --- a/rtl/unix/sysutils.pp +++ b/rtl/unix/sysutils.pp @@ -911,6 +911,11 @@ Begin { We're in the parent, let's wait. } result:=WaitProcess(pid); // WaitPid and result-convert + {$ifdef FPC_USE_FPEXEC} + if Comline<>'' Then + freemem(cmdline2); + {$endif} + if (result<0) or (result=127) then begin E:=EOSError.CreateFmt(SExecuteProcessFailed,[Path,result]);