From c1be973ae1135588ed77b365bfd3bf063bac78ae Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Tue, 21 Jun 2011 20:34:17 +0300 Subject: [PATCH] vhost: fix double free on device stop vhost dev stop failed to clear the log field. Typically not an issue as dev start overwrites this field, but if logging gets disabled before the following start, it doesn't so this causes a double free. Signed-off-by: Michael S. Tsirkin --- hw/vhost.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/vhost.c b/hw/vhost.c index 80f771e448..c3d88214fe 100644 --- a/hw/vhost.c +++ b/hw/vhost.c @@ -784,5 +784,6 @@ void vhost_dev_stop(struct vhost_dev *hdev, VirtIODevice *vdev) hdev->started = false; qemu_free(hdev->log); + hdev->log = NULL; hdev->log_size = 0; } -- 2.11.4.GIT