Use the xstrdup() version of the function