Should I free/delete char* returned by getenv()?

No you shouldn’t. Standard 7.20.4.5 says :

The getenv function returns a pointer
to a string associated with the
matched list member. The string
pointed to shall not be modified by
the program
, but may be overwritten by
a subsequent call to the getenv
function.

I believe deletion is covered by the text in bold.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)