From: Klaus Jensen <k.jensen@samsung.com>
The buffer holding the ranges for the copy command is not correctly
deallocated.
Fix this.
Cc: qemu-stable@nongnu.org
Link: https://gitlab.com/qemu-project/qemu/-/work_items/4072
Fixes: 796d20681d9b ("hw/nvme: reimplement the copy command to allow aio cancellation")
Reviewed-by: Jesper Wendel Devantier <foss@defmacro.it>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
---
hw/nvme/ctrl.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c
index 8461b6fbdeae..4893cf7e7418 100644
--- a/hw/nvme/ctrl.c
+++ b/hw/nvme/ctrl.c
@@ -2811,6 +2811,7 @@ static void nvme_copy_done(NvmeCopyAIOCB *iocb)
qemu_iovec_destroy(&iocb->iov);
g_free(iocb->bounce);
+ g_free(iocb->ranges);
if (iocb->ret < 0) {
block_acct_failed(stats, &iocb->acct.read);
--
2.53.0