pml/v: fix a memory leak
close the framework if no more component should be used Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
Этот коммит содержится в:
родитель
ef2b3ac8d2
Коммит
af67183e2f
@ -5,6 +5,8 @@
|
||||
* Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2016 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -97,13 +99,23 @@ static int mca_pml_v_component_register(void)
|
||||
|
||||
static int mca_pml_v_component_open(void)
|
||||
{
|
||||
int rc;
|
||||
pml_v_output_open(ompi_pml_v_output, ompi_pml_v_verbose);
|
||||
|
||||
V_OUTPUT_VERBOSE(500, "loaded");
|
||||
|
||||
mca_vprotocol_base_set_include_list(ompi_pml_vprotocol_include_list);
|
||||
|
||||
return mca_base_framework_open(&ompi_vprotocol_base_framework, 0);
|
||||
if (OMPI_SUCCESS != (rc = mca_base_framework_open(&ompi_vprotocol_base_framework, 0))) {
|
||||
return rc;
|
||||
}
|
||||
|
||||
if( NULL == mca_vprotocol_base_include_list ) {
|
||||
pml_v_output_close();
|
||||
return mca_base_framework_close(&ompi_vprotocol_base_framework);
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int mca_pml_v_component_close(void)
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user