Erik.
I loses NULL initialization. Excuse me.
But your patch bogus too.
unset_env list must initialized as NULL only.
Your code inittialized to stack memory and the loop
while(unset_env) {
unsetenv(unset_env->data);
unset_env = unset_env->link;
}
crashing also.
--w
vodz