Fix ibv_create_wq() to set wq_context upon a successful creation. Fixes: 2864904f82bf ("Introduce Work Queue object and its verbs") Signed-off-by: Yishai Hadas <yishaih@xxxxxxxxxxxx> --- libibverbs/verbs.h | 1 + 1 file changed, 1 insertion(+) diff --git a/libibverbs/verbs.h b/libibverbs/verbs.h index 288985d..5e256b4 100644 --- a/libibverbs/verbs.h +++ b/libibverbs/verbs.h @@ -3073,6 +3073,7 @@ static inline struct ibv_wq *ibv_create_wq(struct ibv_context *context, wq = vctx->create_wq(context, wq_init_attr); if (wq) { + wq->wq_context = wq_init_attr->wq_context; wq->events_completed = 0; pthread_mutex_init(&wq->mutex, NULL); pthread_cond_init(&wq->cond, NULL); -- 1.8.3.1