s/strdup/xstrdup/ - check memory allocations for failure.