While running rping as a client without server on the other end,
rping_test_client fails and the ibv context was getting freed
before memory was deregistered. This patch fixes it.
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
ret = rping_connect_client(cb);
if (ret) {
fprintf(stderr, "connect error %d\n", ret);
- goto err2;
+ goto err3;
}
ret = rping_test_client(cb);
if (ret) {
fprintf(stderr, "rping client failed: %d\n", ret);
- goto err3;
+ goto err4;
}
ret = 0;
-err3:
+err4:
rdma_disconnect(cb->cm_id);
+err3:
pthread_join(cb->cqthread, NULL);
err2:
rping_free_buffers(cb);