Is there any particular reason for exit(0)? Shouldn't it be exit(1)? if(NULL == (tr = malloc(tsiz * sizeof(char)))){ fprintf(stderr,"Unable to malloc.\n"); exit (0); } Ideally, shouldn't this just be: if (NULL == (tr = G_malloc(tsiz * sizeof(char)))) G_fatal_error(_("Unable to allocate memory.")); -- Brad Douglas <rez at touchofmadness.com>