fix getenv shouldn't be freed

Signed-off-by: xiehuc <xiehuc@gmail.com>