Commit 24bfa207 authored by Jason Wang's avatar Jason Wang Committed by Michael S. Tsirkin
Browse files

vhost: put log correctly in vhost_dev_start()



We allocate an dummy log even if the size is zero. So we should put it
unconditionally too.

Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
parent 309750fa
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -1111,9 +1111,7 @@ int vhost_dev_start(struct vhost_dev *hdev, VirtIODevice *vdev)

    return 0;
fail_log:
    if (hdev->log_size) {
    vhost_log_put(hdev, false);
    }
fail_vq:
    while (--i >= 0) {
        vhost_virtqueue_stop(hdev,