diff options
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r-- | Source/cmSystemTools.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index fe6cfa6..032a95d 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -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; } |