From 1400bab466ac3fddc9fe4f84840b19c194558993 Mon Sep 17 00:00:00 2001 From: Nathan Hjelm Date: Tue, 6 Nov 2012 20:06:54 +0000 Subject: [PATCH] fix a couple of errors in r27569 This commit was SVN r27572. The following SVN revision numbers were found above: r27569 --> open-mpi/ompi@f3ce12e71a08f6de6c840fdc49dcf5cf4f76d04a --- ompi/mca/pml/v/pml_v_component.c | 4 +++- ompi/mca/vprotocol/base/vprotocol_base.c | 9 +++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ompi/mca/pml/v/pml_v_component.c b/ompi/mca/pml/v/pml_v_component.c index f319129f78..aa061f4abd 100644 --- a/ompi/mca/pml/v/pml_v_component.c +++ b/ompi/mca/pml/v/pml_v_component.c @@ -86,7 +86,9 @@ static int mca_pml_v_component_open(void) V_OUTPUT_VERBOSE(500, "loaded"); rc = mca_vprotocol_base_open(vprotocol_include_list); - free (vprotocol_include_list); + if (NULL == vprotocol_include_list) { + free (vprotocol_include_list); + } return rc; } diff --git a/ompi/mca/vprotocol/base/vprotocol_base.c b/ompi/mca/vprotocol/base/vprotocol_base.c index e2853fe6a2..dbf513c9a5 100644 --- a/ompi/mca/vprotocol/base/vprotocol_base.c +++ b/ompi/mca/vprotocol/base/vprotocol_base.c @@ -28,10 +28,15 @@ int mca_vprotocol_base_open(char *vprotocol_include_list) { OBJ_CONSTRUCT(&mca_vprotocol_base_components_available, opal_list_t); if (NULL == vprotocol_include_list || - mca_vprotocol_base_include_list[0] == 0) { + vprotocol_include_list[0] == 0) { return OMPI_SUCCESS; } - mca_vprotocol_base_include_list = strdup (vprotocol_include_list); + if (NULL != vprotocol_include_list) { + mca_vprotocol_base_include_list = strdup (vprotocol_include_list); + } else { + mca_vprotocol_base_include_list = NULL; + } + return mca_base_components_open("vprotocol", 0, mca_vprotocol_base_static_components, &mca_vprotocol_base_components_available,