File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -326,10 +326,10 @@ int mca_spml_ucx_add_procs(ompi_proc_t** procs, size_t nprocs)
326326
327327 opal_progress_register (spml_ucx_default_progress );
328328
329- mca_spml_ucx .remote_addrs_tbl = (char * * * )calloc (mca_spml_ucx .ucp_workers , sizeof (char * * * ));
329+ mca_spml_ucx .remote_addrs_tbl = (char * * * )calloc (mca_spml_ucx .ucp_workers ,
330+ sizeof (mca_spml_ucx .remote_addrs_tbl [0 ]));
330331 for (w = 0 ; w < ucp_workers ; w ++ ) {
331- mca_spml_ucx .remote_addrs_tbl [w ] = (char * * )calloc (nprocs , sizeof (char * * ));
332- memset (mca_spml_ucx .remote_addrs_tbl [w ], 0 , nprocs * sizeof (char * * ));
332+ mca_spml_ucx .remote_addrs_tbl [w ] = (char * * )calloc (nprocs , sizeof (mca_spml_ucx .remote_addrs_tbl [w ][0 ]));
333333 }
334334
335335 /* Store all remote addresses */
@@ -372,6 +372,8 @@ int mca_spml_ucx_add_procs(ompi_proc_t** procs, size_t nprocs)
372372 free (wk_raddrs );
373373 free (wk_rsizes );
374374 free (wk_roffs );
375+ free (wk_addr_len );
376+ free (wk_local_addr );
375377
376378 SPML_UCX_VERBOSE (50 , "*** ADDED PROCS ***" );
377379
@@ -407,6 +409,8 @@ int mca_spml_ucx_add_procs(ompi_proc_t** procs, size_t nprocs)
407409 free (wk_rsizes );
408410 free (wk_roffs );
409411error :
412+ free (wk_addr_len );
413+ free (wk_local_addr );
410414 rc = OSHMEM_ERR_OUT_OF_RESOURCE ;
411415 SPML_UCX_ERROR ("add procs FAILED rc=%d" , rc );
412416 return rc ;
You can’t perform that action at this time.
0 commit comments