qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] block/nvme: Remove memory leak
@ 2020-04-14 15:17 Philippe Mathieu-Daudé
  2020-04-15  7:46 ` Stefano Garzarella
  0 siblings, 1 reply; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-04-14 15:17 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Kevin Wolf, qemu-block, Max Reitz, Stefan Hajnoczi,
	Philippe Mathieu-Daudé

Fixes: bdd6a90a9 ("Add VFIO based NVMe driver")
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 block/nvme.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/block/nvme.c b/block/nvme.c
index 7b7c0cc5d6..9f3c7ab819 100644
--- a/block/nvme.c
+++ b/block/nvme.c
@@ -163,6 +163,7 @@ static void nvme_init_queue(BlockDriverState *bs, NVMeQueue *q,
     }
     r = qemu_vfio_dma_map(s->vfio, q->queue, bytes, false, &q->iova);
     if (r) {
+        qemu_vfree(q->queue);
         error_setg(errp, "Cannot map queue");
     }
 }
-- 
2.21.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-04-15  7:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-14 15:17 [PATCH] block/nvme: Remove memory leak Philippe Mathieu-Daudé
2020-04-15  7:46 ` Stefano Garzarella
2020-04-15  7:57   ` Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).