1
1
Fix minor memory leak.

Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
Этот коммит содержится в:
Jeff Squyres 2018-03-24 05:18:59 -07:00
родитель 1c75aa82fc
Коммит 124208198c

Просмотреть файл

@ -17,6 +17,7 @@
* Copyright (c) 2015 NVIDIA Corporation. All rights reserved. * Copyright (c) 2015 NVIDIA Corporation. All rights reserved.
* Copyright (c) 2015-2017 Intel, Inc. All rights reserved. * Copyright (c) 2015-2017 Intel, Inc. All rights reserved.
* Copyright (c) 2016-2017 IBM Corporation. All rights reserved. * Copyright (c) 2016-2017 IBM Corporation. All rights reserved.
* Copyright (c) 2018 Cisco Systems, Inc. All rights reserved
* $COPYRIGHT$ * $COPYRIGHT$
* *
* Additional copyrights may follow * Additional copyrights may follow
@ -775,10 +776,12 @@ static int ompi_osc_rdma_query_mtls (void)
if (mtls_to_use && ompi_mtl_base_selected_component) { if (mtls_to_use && ompi_mtl_base_selected_component) {
for (int i = 0 ; mtls_to_use[i] ; ++i) { for (int i = 0 ; mtls_to_use[i] ; ++i) {
if (0 == strcmp (mtls_to_use[i], ompi_mtl_base_selected_component->mtl_version.mca_component_name)) { if (0 == strcmp (mtls_to_use[i], ompi_mtl_base_selected_component->mtl_version.mca_component_name)) {
opal_argv_free(mtls_to_use);
return OMPI_SUCCESS; return OMPI_SUCCESS;
} }
} }
} }
opal_argv_free(mtls_to_use);
return -1; return -1;
} }