提交 c1be973a 编写于 作者: M Michael S. Tsirkin

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: NMichael S. Tsirkin <mst@redhat.com>
上级 89b9ba66
......@@ -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;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册