Skip to content

Commit

Permalink
Merge pull request #4655 from yosefe/topic/spml-ucx-fix-rkey-leak
Browse files Browse the repository at this point in the history
spml_ucx: fix rkey leak
  • Loading branch information
yosefe authored Dec 27, 2017
2 parents 697a943 + 1193e1e commit 70a2098
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions oshmem/mca/spml/ucx/spml_ucx.c
Original file line number Diff line number Diff line change
Expand Up @@ -528,12 +528,13 @@ int mca_spml_ucx_deregister(sshmem_mkey_t *mkeys)
if (!mkeys[0].spml_context)
return OSHMEM_SUCCESS;

mem_seg = memheap_find_va(mkeys[0].va_base);
mem_seg = memheap_find_va(mkeys[0].va_base);
ucx_mkey = (spml_ucx_mkey_t*)mkeys[0].spml_context;

if (MAP_SEGMENT_ALLOC_UCX != mem_seg->type) {
ucx_mkey = (spml_ucx_mkey_t *)mkeys[0].spml_context;
ucp_mem_unmap(mca_spml_ucx.ucp_context, ucx_mkey->mem_h);
}
ucp_rkey_destroy(ucx_mkey->rkey);

if (0 < mkeys[0].len) {
ucp_rkey_buffer_release(mkeys[0].u.data);
Expand Down

0 comments on commit 70a2098

Please sign in to comment.