Fix the memory copy error in function "strdup"