void cleanup_subkind_nic(libxl__remus_devices_state *rds) { STATE_AO_GC(rds->ao); /* free qdisc cache */ if (rds->qdisc_cache) { nl_cache_clear(rds->qdisc_cache); nl_cache_free(rds->qdisc_cache); rds->qdisc_cache = NULL; } /* close & free nlsock */ if (rds->nlsock) { nl_close(rds->nlsock); nl_socket_free(rds->nlsock); rds->nlsock = NULL; } }
void cleanup_subkind_nic(libxl__checkpoint_devices_state *cds) { libxl__remus_state *rs = cds->concrete_data; STATE_AO_GC(cds->ao); /* free qdisc cache */ if (rs->qdisc_cache) { nl_cache_clear(rs->qdisc_cache); nl_cache_free(rs->qdisc_cache); rs->qdisc_cache = NULL; } /* close & free nlsock */ if (rs->nlsock) { nl_close(rs->nlsock); nl_socket_free(rs->nlsock); rs->nlsock = NULL; } }