diff mbox series

[08/13] hw/rdma: Reorder resource cleanup

Message ID 20180716074038.3364-9-yuval.shaia@oracle.com
State New
Headers show
Series Misc fixes for pvrdma device | expand

Commit Message

Yuval Shaia July 16, 2018, 7:40 a.m. UTC
To be consistence with allocation do the reverse order in deallocation

Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
---
 hw/rdma/rdma_rm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Marcel Apfelbaum July 16, 2018, 10:44 a.m. UTC | #1
On 07/16/2018 10:40 AM, Yuval Shaia wrote:
> To be consistence with allocation do the reverse order in deallocation
>
> Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
> ---
>   hw/rdma/rdma_rm.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/hw/rdma/rdma_rm.c b/hw/rdma/rdma_rm.c
> index bf4a5c71b4..1f014b4ab2 100644
> --- a/hw/rdma/rdma_rm.c
> +++ b/hw/rdma/rdma_rm.c
> @@ -543,8 +543,9 @@ void rdma_rm_fini(RdmaDeviceResources *dev_res)
>       res_tbl_free(&dev_res->uc_tbl);
>       res_tbl_free(&dev_res->cqe_ctx_tbl);
>       res_tbl_free(&dev_res->qp_tbl);
> -    res_tbl_free(&dev_res->cq_tbl);
>       res_tbl_free(&dev_res->mr_tbl);
> +    res_tbl_free(&dev_res->cq_tbl);
>       res_tbl_free(&dev_res->pd_tbl);
> +
>       g_hash_table_destroy(dev_res->qp_hash);
>   }


Reviewed-by: Marcel Apfelbaum<marcel.apfelbaum@gmail.com>

Thanks,
Marcel
diff mbox series

Patch

diff --git a/hw/rdma/rdma_rm.c b/hw/rdma/rdma_rm.c
index bf4a5c71b4..1f014b4ab2 100644
--- a/hw/rdma/rdma_rm.c
+++ b/hw/rdma/rdma_rm.c
@@ -543,8 +543,9 @@  void rdma_rm_fini(RdmaDeviceResources *dev_res)
     res_tbl_free(&dev_res->uc_tbl);
     res_tbl_free(&dev_res->cqe_ctx_tbl);
     res_tbl_free(&dev_res->qp_tbl);
-    res_tbl_free(&dev_res->cq_tbl);
     res_tbl_free(&dev_res->mr_tbl);
+    res_tbl_free(&dev_res->cq_tbl);
     res_tbl_free(&dev_res->pd_tbl);
+
     g_hash_table_destroy(dev_res->qp_hash);
 }