File tree 1 file changed +5
-3
lines changed 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -689,7 +689,7 @@ sshmem_mkey_t *mca_spml_ucx_register(void* addr,
689
689
{
690
690
sshmem_mkey_t * mkeys ;
691
691
ucs_status_t status ;
692
- spml_ucx_mkey_t * ucx_mkey ;
692
+ spml_ucx_mkey_t * ucx_mkey = NULL ;
693
693
size_t len ;
694
694
ucp_mem_map_params_t mem_map_params ;
695
695
uint32_t segno ;
@@ -740,7 +740,7 @@ sshmem_mkey_t *mca_spml_ucx_register(void* addr,
740
740
status = ucp_rkey_pack (mca_spml_ucx .ucp_context , mem_h ,
741
741
& mkeys [SPML_UCX_TRANSP_IDX ].u .data , & len );
742
742
if (UCS_OK != status ) {
743
- goto error_unmap ;
743
+ goto error_out ;
744
744
}
745
745
if (len >= 0xffff ) {
746
746
SPML_UCX_ERROR ("packed rkey is too long: %llu >= %d" ,
@@ -761,7 +761,9 @@ sshmem_mkey_t *mca_spml_ucx_register(void* addr,
761
761
return mkeys ;
762
762
763
763
error_unmap :
764
- ucp_mem_unmap (mca_spml_ucx .ucp_context , ucx_mkey -> mem_h );
764
+ if (NULL != ucx_mkey ) {
765
+ ucp_mem_unmap (mca_spml_ucx .ucp_context , ucx_mkey -> mem_h );
766
+ }
765
767
error_out :
766
768
free (mkeys );
767
769
You can’t perform that action at this time.
0 commit comments