Use strdup instead of malloc + strcpy