From 892f1fb534a023139397c9ab02becf62bd0d4164 Mon Sep 17 00:00:00 2001 From: Tim Woodall Date: Wed, 18 Aug 2004 15:54:14 +0000 Subject: [PATCH] code cleanup This commit was SVN r2205. --- src/mca/ptl/base/base.h | 2 ++ src/mca/ptl/base/ptl_base_close.c | 7 ++++++- src/mca/ptl/base/ptl_base_open.c | 4 ++-- src/mca/ptl/base/ptl_base_select.c | 3 --- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/mca/ptl/base/base.h b/src/mca/ptl/base/base.h index 148f2eac17..86c93340b2 100644 --- a/src/mca/ptl/base/base.h +++ b/src/mca/ptl/base/base.h @@ -43,6 +43,8 @@ extern "C" { * Globals */ extern int mca_ptl_base_output; +extern char* mca_ptl_base_include; +extern char* mca_ptl_base_exclude; extern ompi_list_t mca_ptl_base_components_opened; extern ompi_list_t mca_ptl_base_modules_initialized; diff --git a/src/mca/ptl/base/ptl_base_close.c b/src/mca/ptl/base/ptl_base_close.c index c2bcd5f64d..3836b12425 100644 --- a/src/mca/ptl/base/ptl_base_close.c +++ b/src/mca/ptl/base/ptl_base_close.c @@ -41,7 +41,12 @@ int mca_ptl_base_close(void) &mca_ptl_base_components_opened, NULL); } - /* All done */ + /* cleanup */ + if(NULL != mca_ptl_base_include) + free(mca_ptl_base_include); + if(NULL != mca_ptl_base_exclude) + free(mca_ptl_base_exclude); + /* All done */ return OMPI_SUCCESS; } diff --git a/src/mca/ptl/base/ptl_base_open.c b/src/mca/ptl/base/ptl_base_open.c index b66a11ebb4..d0a06e1cd1 100644 --- a/src/mca/ptl/base/ptl_base_open.c +++ b/src/mca/ptl/base/ptl_base_open.c @@ -26,8 +26,8 @@ * Global variables */ int mca_ptl_base_output = -1; -char* mca_ptl_base_include = ""; -char* mca_ptl_base_exclude = ""; +char* mca_ptl_base_include = NULL; +char* mca_ptl_base_exclude = NULL; ompi_list_t mca_ptl_base_components_opened; ompi_list_t mca_ptl_base_modules_initialized; diff --git a/src/mca/ptl/base/ptl_base_select.c b/src/mca/ptl/base/ptl_base_select.c index 9f5220fcf0..1356e35ac7 100644 --- a/src/mca/ptl/base/ptl_base_select.c +++ b/src/mca/ptl/base/ptl_base_select.c @@ -10,9 +10,6 @@ #include "mca/ptl/ptl.h" #include "mca/ptl/base/base.h" -extern char* mca_ptl_base_include; /* list of ptls to include */ -extern char* mca_ptl_base_exclude; /* list of ptls to exclude */ - /** * Function for weeding out ptl components that don't want to run. *