Use xxmalloc() and xxstrdup().