]> git.openfabrics.org - ~shefty/librdmacm.git/commitdiff
Refresh of destroy_cqs
authorSean Hefty <sean.hefty@intel.com>
Mon, 21 May 2012 05:42:28 +0000 (22:42 -0700)
committerSean Hefty <sean.hefty@intel.com>
Mon, 21 May 2012 05:42:28 +0000 (22:42 -0700)
src/cma.c

index c32803d5640d03316d3c21ba6178ac142a6d08b3..9cd34cf592b4ab80bcb9a693d9543ef2254d19df 100755 (executable)
--- a/src/cma.c
+++ b/src/cma.c
@@ -1096,10 +1096,10 @@ static void ucma_destroy_cqs(struct rdma_cm_id *id)
        if (id->recv_cq_channel)
                ibv_destroy_comp_channel(id->recv_cq_channel);
 
-       if (id->send_cq)
+       if (id->send_cq && (id->send_cq != id->recv_cq))
                ibv_destroy_cq(id->send_cq);
 
-       if (id->send_cq_channel)
+       if (id->send_cq_channel && (id->send_cq_channel != id->recv_cq_channel))
                ibv_destroy_comp_channel(id->send_cq_channel);
 }