Handle out of memory condition in various parts of fish by shutting down instead of crashing

darcs-hash:20070109025102-ac50b-ee7951028e626628257852fd9b5de97572609cea.gz
This commit is contained in:
axel
2007-01-09 12:51:02 +10:00
parent 76fedccf13
commit d8b5cc6717
4 changed files with 20 additions and 3 deletions

3
env.c
View File

@@ -808,6 +808,9 @@ int env_set( const wchar_t *key,
entry = malloc( sizeof( var_entry_t ) +
sizeof(wchar_t )*(wcslen(val)+1));
if( !entry )
DIE_MEM();
if( var_mode & ENV_EXPORT)
{
entry->export = 1;