From: Li Qiang <liq3ea@gmail.com>
To: keith.busch@intel.com, kwolf@redhat.com, mreitz@redhat.com
Cc: qemu-block@nongnu.org, qemu-devel@nongnu.org,
Li Qiang <liq3ea@gmail.com>
Subject: [Qemu-devel] [PATCH 2/2] nvme: free cmbuf in nvme_exit
Date: Sun, 28 Oct 2018 23:29:41 -0700 [thread overview]
Message-ID: <1540794581-33578-3-git-send-email-liq3ea@gmail.com> (raw)
In-Reply-To: <1540794581-33578-1-git-send-email-liq3ea@gmail.com>
This avoid a memory leak in unhotplug nvme device.
Signed-off-by: Li Qiang <liq3ea@gmail.com>
---
hw/block/nvme.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index 359a06d0ad..09d7c90259 100644
--- a/hw/block/nvme.c
+++ b/hw/block/nvme.c
@@ -1332,6 +1332,9 @@ static void nvme_exit(PCIDevice *pci_dev)
g_free(n->cq);
g_free(n->sq);
+ if (n->cmb_size_mb) {
+ g_free(n->cmbuf);
+ }
msix_uninit_exclusive_bar(pci_dev);
}
--
2.11.0
next prev parent reply other threads:[~2018-10-29 6:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-29 6:29 [Qemu-devel] [PATCH 0/2] nvme: fix two issues in nvme unhotplug Li Qiang
2018-10-29 6:29 ` [Qemu-devel] [PATCH 1/2] nvme: don't unref ctrl_mem when device unrealized Li Qiang
2018-11-05 14:57 ` Li Qiang
2018-11-06 15:58 ` Igor Mammedov
2018-10-29 6:29 ` Li Qiang [this message]
2018-10-29 12:32 ` [Qemu-devel] [PATCH 2/2] nvme: free cmbuf in nvme_exit Philippe Mathieu-Daudé
2018-11-07 9:54 ` [Qemu-devel] [PATCH 0/2] nvme: fix two issues in nvme unhotplug Kevin Wolf
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=1540794581-33578-3-git-send-email-liq3ea@gmail.com \
--to=liq3ea@gmail.com \
--cc=keith.busch@intel.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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).