diff options
author | axel <axel@liljencrantz.se> | 2005-10-25 21:03:52 +1000 |
---|---|---|
committer | axel <axel@liljencrantz.se> | 2005-10-25 21:03:52 +1000 |
commit | ddcb84aa07607bbd274edb89ddc4371d8d7aa27f (patch) | |
tree | 018e34432ab3bc2da81e63765405fc1c1ed210dc /env.c | |
parent | d33229324517aff751901d83aa66c6f24eba0bdc (diff) |
Fix problem bug breaking completion in commands with multiple subshells
darcs-hash:20051025110352-ac50b-fff319ddcbafb722b9bc3c61aa1b250b290716a5.gz
Diffstat (limited to 'env.c')
-rw-r--r-- | env.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -388,8 +388,12 @@ void env_init() pw = getpwuid( getuid() ); - uname = str2wcs( pw->pw_name ); - env_set( L"USER", uname, ENV_GLOBAL | ENV_EXPORT ); + if( pw ) + { + uname = str2wcs( pw->pw_name ); + env_set( L"USER", uname, ENV_GLOBAL | ENV_EXPORT ); + free( uname ); + } env_universal_init( env_get( L"FISHD_SOKET_DIR"), env_get( L"USER" ), @@ -410,6 +414,8 @@ void env_destroy() env_pop(); hash_destroy( &env_read_only ); + + hash_destroy( &env_electric ); hash_foreach( global, &clear_hash_entry ); hash_destroy( global ); |