From 73ad0ff216d2e1cf08909a0597e7b072babfe9c4 Mon Sep 17 00:00:00 2001 From: Klaus Jensen Date: Wed, 4 Nov 2020 11:22:48 +0100 Subject: hw/block/nvme: fix free of array-typed value MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since 7f0f1acedf15 ("hw/block/nvme: support multiple namespaces"), the namespaces member of NvmeCtrl is no longer a dynamically allocated array. Remove the free. Fixes: 7f0f1acedf15 ("hw/block/nvme: support multiple namespaces") Reported-by: Coverity (CID 1436131) Signed-off-by: Klaus Jensen Message-Id: <20201104102248.32168-4-its@irrelevant.dk> Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Max Reitz --- hw/block/nvme.c | 1 - 1 file changed, 1 deletion(-) (limited to 'hw') diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 2bdc50e..01b657b 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -2799,7 +2799,6 @@ static void nvme_exit(PCIDevice *pci_dev) NvmeCtrl *n = NVME(pci_dev); nvme_clear_ctrl(n); - g_free(n->namespaces); g_free(n->cq); g_free(n->sq); g_free(n->aer_reqs); -- cgit v1.1