IB/ehca: Fix memory leak in error path of ehca_get_dma_mr()
Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
This commit is contained in:
parent
fbb9318be4
commit
3df78f81e0
1 changed files with 1 additions and 0 deletions
|
@ -111,6 +111,7 @@ struct ib_mr *ehca_get_dma_mr(struct ib_pd *pd, int mr_access_flags)
|
|||
&e_maxmr->ib.ib_mr.lkey,
|
||||
&e_maxmr->ib.ib_mr.rkey);
|
||||
if (ret) {
|
||||
ehca_mr_delete(e_maxmr);
|
||||
ib_mr = ERR_PTR(ret);
|
||||
goto get_dma_mr_exit0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue