projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
722f8c5
)
virtio: make virtio_delete_queue idempotent
author
Michael S. Tsirkin
<mst@redhat.com>
Mon, 9 Dec 2019 16:47:24 +0000
(11:47 -0500)
committer
Michael S. Tsirkin
<mst@redhat.com>
Sun, 5 Jan 2020 12:03:03 +0000
(07:03 -0500)
Let's make sure calling this twice is harmless -
no known instances, but seems safer.
Suggested-by: Pan Nengyuan <pannengyuan@huawei.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/virtio/virtio.c
patch
|
blob
|
history
diff --git
a/hw/virtio/virtio.c
b/hw/virtio/virtio.c
index 31dd140990f784884b541b293105592287776b55..6de3cfdc2c99b655df18a46fdebf51ab3857eb33 100644
(file)
--- a/
hw/virtio/virtio.c
+++ b/
hw/virtio/virtio.c
@@
-2337,6
+2337,7
@@
void virtio_delete_queue(VirtQueue *vq)
vq->handle_output = NULL;
vq->handle_aio_output = NULL;
g_free(vq->used_elems);
+ vq->used_elems = NULL;
}
void virtio_del_queue(VirtIODevice *vdev, int n)