filename, MSG_storage_get_used_size(st), MSG_storage_get_size(st));
if (MSG_process_self_PID() == 1){
- XBT_INFO("\tUnlink file '%s'",MSG_file_get_name(file));
+ XBT_INFO("\tUnlink file '%s'", MSG_file_get_name(file));
MSG_file_unlink(file);
} else {
- XBT_INFO("\tClose file '%s'",filename);
+ XBT_INFO("\tClose file '%s'", filename);
MSG_file_close(file);
}
return 0;
msg_storage_t storage_src = simgrid::s4u::Storage::byName(fd->storageId);
msg_host_t attached_host = storage_src->host();
fd->unlink(attached_host);
+ delete fd;
return MSG_OK;
}
if (host->isOff())
THROWF(host_error, 0, "Host %s failed, you cannot call this function", host->cname());
- int res = surf_host_unlink(host, fd->surf_file);
- xbt_free(fd);
- return res;
+ return surf_host_unlink(host, fd->surf_file);
}
sg_size_t simcall_HANDLER_file_get_size(smx_simcall_t simcall, smx_file_t fd)
// Remove the file from storage
st->content_->erase(fd->name);
- xbt_free(fd->name);
- xbt_free(fd->mount);
- xbt_free(fd);
return 0;
}
}