rs_free function clears index map item corresponding to the roscket
(in idm_clear called from rs_remove) and then uses it in
iomapping cleanup (in riounmap called from rs_free_iomappings).
Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
return;
}
- if (rs->index >= 0)
- rs_remove(rs);
-
if (rs->rmsg)
free(rs->rmsg);
rdma_destroy_id(rs->cm_id);
}
+ if (rs->index >= 0)
+ rs_remove(rs);
+
fastlock_destroy(&rs->map_lock);
fastlock_destroy(&rs->cq_wait_lock);
fastlock_destroy(&rs->cq_lock);