transport: fix leaks in refs_from_alternate_cb