From c1be973ae1135588ed77b365bfd3bf063bac78ae Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Tue, 21 Jun 2011 20:34:17 +0300 Subject: 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(+) (limited to 'hw') diff --git a/hw/vhost.c b/hw/vhost.c index 80f771e..c3d8821 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; } -- cgit v1.1