-static void vm_ws_destroy(const char *name)
-{
- workstation_VM2013_t workstation = xbt_lib_get_or_null(host_lib, name, SURF_WKS_LEVEL);
- xbt_assert(workstation);
- xbt_assert(workstation->generic_resource.model == surf_vm_workstation_model);
-
- xbt_free(workstation->generic_resource.name);
+static void vm_ws_destroy(smx_host_t host)
+{
+ workstation_VM2013_t vm_ws = surf_workstation_resource_priv(host);
+ xbt_assert(vm_ws);
+ xbt_assert(vm_ws->generic_resource.model == surf_vm_workstation_model);