check for strdup failure