diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2011-06-21 20:34:17 +0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2011-07-17 18:47:33 +0300 |
commit | c1be973ae1135588ed77b365bfd3bf063bac78ae (patch) | |
tree | c4d1a6164f95087c91962c7b691c6451af6a20a6 /hw | |
parent | 89b9ba661bd2d6155308f895ec075d813f0e129b (diff) |
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 <mst@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/vhost.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; } |