From d37706f6f8ee884245c85730b22a1d1fdd191a12 Mon Sep 17 00:00:00 2001 From: George Bosilca Date: Tue, 4 Nov 2008 16:49:46 +0000 Subject: [PATCH] Reset the variables to NULL after releasing the memory. This commit was SVN r19912. --- ompi/mca/btl/tcp/btl_tcp_component.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ompi/mca/btl/tcp/btl_tcp_component.c b/ompi/mca/btl/tcp/btl_tcp_component.c index 603a78e805..24bc3a33c3 100644 --- a/ompi/mca/btl/tcp/btl_tcp_component.c +++ b/ompi/mca/btl/tcp/btl_tcp_component.c @@ -272,10 +272,15 @@ int mca_btl_tcp_component_close(void) opal_list_item_t* item; opal_list_item_t* next; - if(NULL != mca_btl_tcp_component.tcp_if_include) + if(NULL != mca_btl_tcp_component.tcp_if_include) { free(mca_btl_tcp_component.tcp_if_include); - if(NULL != mca_btl_tcp_component.tcp_if_exclude) + mca_btl_tcp_component.tcp_if_include = NULL; + } + if(NULL != mca_btl_tcp_component.tcp_if_exclude) { free(mca_btl_tcp_component.tcp_if_exclude); + mca_btl_tcp_component.tcp_if_exclude = NULL; + } + if (NULL != mca_btl_tcp_component.tcp_btls) free(mca_btl_tcp_component.tcp_btls);