Commit 3df78f81 authored by Hoang-Nam Nguyen's avatar Hoang-Nam Nguyen Committed by Roland Dreier

IB/ehca: Fix memory leak in error path of ehca_get_dma_mr()

Signed-off-by: default avatarJoachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent fbb9318b
...@@ -111,6 +111,7 @@ struct ib_mr *ehca_get_dma_mr(struct ib_pd *pd, int mr_access_flags) ...@@ -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.lkey,
&e_maxmr->ib.ib_mr.rkey); &e_maxmr->ib.ib_mr.rkey);
if (ret) { if (ret) {
ehca_mr_delete(e_maxmr);
ib_mr = ERR_PTR(ret); ib_mr = ERR_PTR(ret);
goto get_dma_mr_exit0; goto get_dma_mr_exit0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment