]> Git Repo - qemu.git/commitdiff
vhost: assert the log was cleaned up
authorMarc-André Lureau <[email protected]>
Tue, 26 Jul 2016 21:15:00 +0000 (01:15 +0400)
committerMichael S. Tsirkin <[email protected]>
Thu, 28 Jul 2016 21:33:46 +0000 (00:33 +0300)
Make sure the log was released on cleanup, or it will leak (the
alternative is to call vhost_log_put() unconditionally, but it may hide
some dev state issues).

Signed-off-by: Marc-André Lureau <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
hw/virtio/vhost.c

index 9bac1636c55183887c0d7a123ba422d409def8df..8a18f9b66921fea3bcb52225bef4653563930fe2 100644 (file)
@@ -1134,6 +1134,7 @@ void vhost_dev_cleanup(struct vhost_dev *hdev)
     g_free(hdev->mem);
     g_free(hdev->mem_sections);
     hdev->vhost_ops->vhost_backend_cleanup(hdev);
+    assert(!hdev->log);
     QLIST_REMOVE(hdev, entry);
 }
 
This page took 0.030936 seconds and 4 git commands to generate.