From 407b921cc324a444b5f12074af09bb8eb60b837d Mon Sep 17 00:00:00 2001 From: George Bosilca Date: Wed, 6 Jul 2005 18:26:16 +0000 Subject: [PATCH] Protect the base PTL close against multiple call of close. The problem came mainly from the fact that we have several PML and that each one will call the PTL close in their own close function. This commit was SVN r6360. --- ompi/mca/ptl/base/ptl_base_close.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ompi/mca/ptl/base/ptl_base_close.c b/ompi/mca/ptl/base/ptl_base_close.c index b6c8499f18..9e28bca2c6 100644 --- a/ompi/mca/ptl/base/ptl_base_close.c +++ b/ompi/mca/ptl/base/ptl_base_close.c @@ -59,10 +59,14 @@ int mca_ptl_base_close(void) } /* cleanup */ - if(NULL != mca_ptl_base_include) + if( NULL != mca_ptl_base_include ) { free(mca_ptl_base_include); - if(NULL != mca_ptl_base_exclude) + mca_ptl_base_include = NULL; + } + if( NULL != mca_ptl_base_exclude ) { free(mca_ptl_base_exclude); + mca_ptl_base_exclude = NULL; + } /* restore event processing */ opal_event_enable();