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 @@ -323,10 +323,10 @@ int mca_spml_ucx_add_procs(ompi_proc_t** procs, size_t nprocs)
323323
324324 opal_progress_register (spml_ucx_default_progress );
325325
326- mca_spml_ucx .remote_addrs_tbl = (char * * * )calloc (mca_spml_ucx .ucp_workers , sizeof (char * * * ));
326+ mca_spml_ucx .remote_addrs_tbl = (char * * * )calloc (mca_spml_ucx .ucp_workers ,
327+ sizeof (mca_spml_ucx .remote_addrs_tbl [0 ]));
327328 for (w = 0 ; w < ucp_workers ; w ++ ) {
328- mca_spml_ucx .remote_addrs_tbl [w ] = (char * * )calloc (nprocs , sizeof (char * * ));
329- memset (mca_spml_ucx .remote_addrs_tbl [w ], 0 , nprocs * sizeof (char * * ));
329+ mca_spml_ucx .remote_addrs_tbl [w ] = (char * * )calloc (nprocs , sizeof (mca_spml_ucx .remote_addrs_tbl [w ][0 ]));
330330 }
331331
332332 /* Store all remote addresses */
@@ -369,6 +369,8 @@ int mca_spml_ucx_add_procs(ompi_proc_t** procs, size_t nprocs)
369369 free (wk_raddrs );
370370 free (wk_rsizes );
371371 free (wk_roffs );
372+ free (wk_addr_len );
373+ free (wk_local_addr );
372374
373375 SPML_UCX_VERBOSE (50 , "*** ADDED PROCS ***" );
374376
@@ -404,6 +406,8 @@ int mca_spml_ucx_add_procs(ompi_proc_t** procs, size_t nprocs)
404406 free (wk_rsizes );
405407 free (wk_roffs );
406408error :
409+ free (wk_addr_len );
410+ free (wk_local_addr );
407411 rc = OSHMEM_ERR_OUT_OF_RESOURCE ;
408412 SPML_UCX_ERROR ("add procs FAILED rc=%d" , rc );
409413 return rc ;
You can’t perform that action at this time.
0 commit comments