BUG: Fix valgrind error. If working directory is not set do not do chdir

This commit is contained in:
Andy Cedilnik 2004-01-21 13:38:09 -05:00
parent 13753b89c2
commit d609e037b9
1 changed files with 13 additions and 12 deletions

View File

@ -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;