mirror of https://gitee.com/openkylin/qemu.git
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>
This commit is contained in:
parent
89b9ba661b
commit
c1be973ae1
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue