Skip to content

Commit

Permalink
hw/rdma: Do not use bitmap_zero_extend to free bitmap
Browse files Browse the repository at this point in the history
bitmap_zero_extend is designed to work for extending, not for
shrinking.
Using g_free instead.

Signed-off-by: Yuval Shaia <[email protected]>
Reviewed-by: Marcel Apfelbaum <[email protected]>
Signed-off-by: Marcel Apfelbaum <[email protected]>
  • Loading branch information
Yuval Shaia authored and marcel-apf committed Dec 22, 2018
1 parent ffa65d9 commit 9a3053d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hw/rdma/rdma_rm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9a3053d

Please sign in to comment.