[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 04/25] virtio: Free rnd virqueue at unrealize()
From: |
Michael S. Tsirkin |
Subject: |
[PULL 04/25] virtio: Free rnd virqueue at unrealize() |
Date: |
Sat, 26 Oct 2019 15:39:27 -0400 |
From: Eugenio Pérez <address@hidden>
The function virtio_del_queue was not called at unrealize() callback.
This was detected due to add an allocated element on the vq introduce
in future commits (used_elems) and running address sanitizer memory
leak detector.
Signed-off-by: Eugenio Pérez <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
hw/virtio/virtio-rng.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/virtio/virtio-rng.c b/hw/virtio/virtio-rng.c
index e93bed020f..b498a20332 100644
--- a/hw/virtio/virtio-rng.c
+++ b/hw/virtio/virtio-rng.c
@@ -238,6 +238,7 @@ static void virtio_rng_device_unrealize(DeviceState *dev,
Error **errp)
qemu_del_vm_change_state_handler(vrng->vmstate);
timer_del(vrng->rate_limit_timer);
timer_free(vrng->rate_limit_timer);
+ virtio_del_queue(vdev, 0);
virtio_cleanup(vdev);
}
--
MST
- [PULL 00/25] virtio: features, tests, Michael S. Tsirkin, 2019/10/26
- [PULL 01/25] virtio: basic structure for packed ring, Michael S. Tsirkin, 2019/10/26
- [PULL 02/25] virtio: device/driver area size calculation refactor for split ring, Michael S. Tsirkin, 2019/10/26
- [PULL 03/25] virtio: Free blk virqueues at unrealize(), Michael S. Tsirkin, 2019/10/26
- [PULL 04/25] virtio: Free rnd virqueue at unrealize(),
Michael S. Tsirkin <=
- [PULL 05/25] virtio: basic packed virtqueue support, Michael S. Tsirkin, 2019/10/26
- [PULL 06/25] virtio: event suppression support for packed ring, Michael S. Tsirkin, 2019/10/26
- [PULL 07/25] vhost_net: enable packed ring support, Michael S. Tsirkin, 2019/10/26
- [PULL 08/25] virtio: add property to enable packed virtqueue, Michael S. Tsirkin, 2019/10/26
- [PULL 09/25] tests/virtio-blk-test: read config space after feature negotiation, Michael S. Tsirkin, 2019/10/26
- [PULL 10/25] libqos: read QVIRTIO_MMIO_VERSION register, Michael S. Tsirkin, 2019/10/26
- [PULL 11/25] libqos: extend feature bits to 64-bit, Michael S. Tsirkin, 2019/10/26
- [PULL 16/25] libqos: implement VIRTIO 1.0 FEATURES_OK step, Michael S. Tsirkin, 2019/10/26
- [PULL 17/25] libqos: access VIRTIO 1.0 vring in little-endian, Michael S. Tsirkin, 2019/10/26
- [PULL 18/25] libqos: add iteration support to qpci_find_capability(), Michael S. Tsirkin, 2019/10/26