ib_srpt: Fix a recently introduced leak in an error path

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3541 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2011-06-05 09:57:35 +00:00
parent 8aacdf09ef
commit 1061f1cf43
+8 -1
View File
@@ -1979,13 +1979,20 @@ err_destroy_cq:
static void srpt_destroy_ch_ib(struct srpt_rdma_ch *ch)
{
WARN_ON(ch->thread);
TRACE_ENTRY();
if (ch->thread) {
kthread_stop(ch->thread);
ch->thread = NULL;
}
while (ib_poll_cq(ch->cq, ARRAY_SIZE(ch->wc), ch->wc) > 0)
;
ib_destroy_qp(ch->qp);
ib_destroy_cq(ch->cq);
TRACE_EXIT();
}
/**