Should we also free ec->symlinks here, given that it's been successfully allocated earlier in this function?