mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-18 13:16:34 +00:00
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:
+8
-1
@@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user