Move strndup call inside of file_get_parent_sd.