]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
hw/rdma: Do not use bitmap_zero_extend to free bitmap
authorYuval Shaia <yuval.shaia@oracle.com>
Fri, 21 Dec 2018 14:40:35 +0000 (16:40 +0200)
committerMarcel Apfelbaum <marcel.apfelbaum@gmail.com>
Sat, 22 Dec 2018 09:09:57 +0000 (11:09 +0200)
bitmap_zero_extend is designed to work for extending, not for
shrinking.
Using g_free instead.

Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
hw/rdma/rdma_rm.c

index b7d4ebe972257fc9df02f465959dc606826ea2b1..ca127c8c26e8f3f44e037a6d84f6bddba636968a 100644 (file)
@@ -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)