fixed strdup mem-leak issues.