>>652
> char * path_dup = strdup(path_dup);
< char * path_dup = strdup(dup);

通りすがりに、取り合えず訂正しておくわ