util: fix getenv usage so the returned string can be freed
util: refer to util_getpass, behaviour should be documented there