From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Fam Zheng" <fam@euphon.net>, "Kevin Wolf" <kwolf@redhat.com>,
qemu-block@nongnu.org, "Max Reitz" <mreitz@redhat.com>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: [PATCH] block/nvme: Remove memory leak
Date: Tue, 14 Apr 2020 17:17:26 +0200 [thread overview]
Message-ID: <20200414151727.17012-1-philmd@redhat.com> (raw)
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
next reply other threads:[~2020-04-14 16:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-14 15:17 Philippe Mathieu-Daudé [this message]
2020-04-15 7:46 ` [PATCH] block/nvme: Remove memory leak Stefano Garzarella
2020-04-15 7:57 ` Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200414151727.17012-1-philmd@redhat.com \
--to=philmd@redhat.com \
--cc=fam@euphon.net \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).