void vhost_dev_cleanup(struct vhost_dev *hdev)

{

    int i;

    for (i = 0; i < hdev->nvqs; ++i) {

        vhost_virtqueue_cleanup(hdev->vqs + i);

    }

    memory_listener_unregister(&hdev->memory_listener);

    if (hdev->migration_blocker) {

        migrate_del_blocker(hdev->migration_blocker);

        error_free(hdev->migration_blocker);

    }

    g_free(hdev->mem);

    g_free(hdev->mem_sections);

    hdev->vhost_ops->vhost_backend_cleanup(hdev);


}
void vhost_dev_cleanup(struct vhost_dev *hdev)

{

    int i;

    for (i = 0; i < hdev->nvqs; ++i) {

        vhost_virtqueue_cleanup(hdev->vqs + i);

    }

    memory_listener_unregister(&hdev->memory_listener);

    if (hdev->migration_blocker) {

        migrate_del_blocker(hdev->migration_blocker);

        error_free(hdev->migration_blocker);

    }

    g_free(hdev->mem);

    g_free(hdev->mem_sections);

    hdev->vhost_ops->vhost_backend_cleanup(hdev);


}
void FUNC_0(struct vhost_dev *VAR_0)

{

    int VAR_1;

    for (VAR_1 = 0; VAR_1 < VAR_0->nvqs; ++VAR_1) {

        vhost_virtqueue_cleanup(VAR_0->vqs + VAR_1);

    }

    memory_listener_unregister(&VAR_0->memory_listener);

    if (VAR_0->migration_blocker) {

        migrate_del_blocker(VAR_0->migration_blocker);

        error_free(VAR_0->migration_blocker);

    }

    g_free(VAR_0->mem);

    g_free(VAR_0->mem_sections);

    VAR_0->vhost_ops->vhost_backend_cleanup(VAR_0);


}
void FUNC_0(struct vhost_dev *VAR_0)
{ int VAR_1; for (VAR_1 = 0; VAR_1 < VAR_0->nvqs; ++VAR_1) { vhost_virtqueue_cleanup(VAR_0->vqs + VAR_1); } memory_listener_unregister(&VAR_0->memory_listener); if (VAR_0->migration_blocker) { migrate_del_blocker(VAR_0->migration_blocker); error_free(VAR_0->migration_blocker); } g_free(VAR_0->mem); g_free(VAR_0->mem_sections); VAR_0->vhost_ops->vhost_backend_cleanup(VAR_0); }