BUG: Fix valgrind error. If working directory is not set do not do chdir
This commit is contained in:
parent
13753b89c2
commit
d609e037b9
|
@ -1044,6 +1044,7 @@ static int kwsysProcessInitialize(kwsysProcess* cp)
|
|||
memset(cp->CommandExitCodes, 0, sizeof(int)*cp->NumberOfCommands);
|
||||
|
||||
/* Allocate memory to save the real working directory. */
|
||||
if ( cp->WorkingDirectory )
|
||||
{
|
||||
#if defined(MAXPATHLEN)
|
||||
cp->RealWorkingDirectoryLength = MAXPATHLEN;
|
||||
|
|
Loading…
Reference in New Issue