Replacing two other strdup calls with proper