ENH: forgot return value

This commit is contained in:
Bill Hoffman 2004-01-26 14:00:22 -05:00
parent 2db971afb4
commit 1d958cad60
1 changed files with 2 additions and 1 deletions

View File

@ -1196,8 +1196,9 @@ bool cmSystemTools::PutEnv(const char* value)
static cmDeletingCharVector localEnvironment;
char* envVar = new char[strlen(value)+1];
strcpy(envVar, value);
putenv(envVar);
int ret = putenv(envVar);
// save the pointer in the static vector so that it can
// be deleted on exit
localEnvironment.push_back(envVar);
return ret == 0;
}