Received: from eggs.gnu.org ([2001:4830:134:3::10]:41779) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gadwI-0006Xj-87 for qemu-devel@nongnu.org; Sat, 22 Dec 2018 04:51:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gadwE-0006eV-He for qemu-devel@nongnu.org; Sat, 22 Dec 2018 04:51:19 -0500 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:50586) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gadw9-0006ZM-6p for qemu-devel@nongnu.org; Sat, 22 Dec 2018 04:51:15 -0500 Received: by mail-wm1-x343.google.com with SMTP id n190so7400061wmd.0 for ; Sat, 22 Dec 2018 01:51:12 -0800 (PST) From: Marcel Apfelbaum Date: Sat, 22 Dec 2018 11:50:27 +0200 Message-Id: <20181222095036.29743-23-marcel.apfelbaum@gmail.com> In-Reply-To: <20181222095036.29743-1-marcel.apfelbaum@gmail.com> References: <20181222095036.29743-1-marcel.apfelbaum@gmail.com> Subject: [Qemu-devel] [PATCH PULL 22/31] hw/rdma: Do not use bitmap_zero_extend to free bitmap List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, peter.maydell@linaro.org Cc: yuval.shaia@oracle.com, marcel.apfelbaum@gmail.com, pjp@fedoraproject.org From: Yuval Shaia bitmap_zero_extend is designed to work for extending, not for shrinking. Using g_free instead. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum Signed-off-by: Marcel Apfelbaum --- hw/rdma/rdma_rm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/rdma/rdma_rm.c b/hw/rdma/rdma_rm.c index b7d4ebe972..ca127c8c26 100644 --- a/hw/rdma/rdma_rm.c +++ b/hw/rdma/rdma_rm.c @@ -43,7 +43,7 @@ static inline void res_tbl_free(RdmaRmResTbl *tbl) { qemu_mutex_destroy(&tbl->lock); g_free(tbl->tbl); - bitmap_zero_extend(tbl->bitmap, tbl->tbl_sz, 0); + g_free(tbl->bitmap); } static inline void *res_tbl_get(RdmaRmResTbl *tbl, uint32_t handle) -- 2.17.1