File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -352,7 +352,7 @@ static int mca_pml_ubcl_create_endpoints(ompi_proc_t *proc)
352352 if (OMPI_SUCCESS == err ) {
353353 goto end ;
354354 } else if (OMPI_ERR_NOT_AVAILABLE != err ) {
355- return err ;
355+ goto error ;
356356 }
357357 }
358358
@@ -366,12 +366,12 @@ static int mca_pml_ubcl_create_endpoints(ompi_proc_t *proc)
366366 if (UBCL_ENDPOINT_TYPE_NONE == type ) {
367367 mca_pml_ubcl_warn (err , "Failed to create recv endpoint for rank %zu\n" ,
368368 new_endpoint -> rank );
369- return err ;
369+ goto error ;
370370 }
371371 } else if (OMPI_SUCCESS != err ) {
372372 mca_pml_ubcl_warn (err , "Failed to create recv endpoint for rank %zu\n" ,
373373 new_endpoint -> rank );
374- return err ;
374+ goto error ;
375375 }
376376 } while (OMPI_SUCCESS != err );
377377
@@ -381,7 +381,7 @@ static int mca_pml_ubcl_create_endpoints(ompi_proc_t *proc)
381381 if (OMPI_SUCCESS != err ) {
382382 mca_pml_ubcl_warn (err , "Failed to create send endpoint for rank %zu\n" ,
383383 new_endpoint -> rank );
384- return err ;
384+ goto error ;
385385 }
386386
387387end :
@@ -390,6 +390,10 @@ static int mca_pml_ubcl_create_endpoints(ompi_proc_t *proc)
390390 mca_pml_ubcl_endpoint_retain (proc );
391391
392392 return UBCL_SUCCESS ;
393+
394+ error :
395+ free (new_endpoint );
396+ return err ;
393397}
394398
395399int mca_pml_ubcl_add_procs (ompi_proc_t * * procs , size_t nprocs )
You can’t perform that action at this time.
0 commit comments