 
                            ...
Do not modify the value returned by the getenv() function. Because the pointer might be used by some other program. If it's necessary to manipulate the return value of getenv()Create a copy and make your changes locally, using setenv() to update environ when necessary. This allows the implementation to properly allocate and manage memory.
Non-Compliant Code Example
...