fix invalid memory access

envname is allocated in stack of na_ctl_callback.
So it might be already released when it is used in main.
v0.8.2 released