From 983eb15335f5fd86c0a6a8ed77f2c14fd39a46c9 Mon Sep 17 00:00:00 2001 From: George Bosilca Date: Mon, 21 Aug 2006 19:52:10 +0000 Subject: [PATCH] If we fail/miss the initialization then do not release anything. This commit was SVN r11302. --- opal/mca/base/mca_base_component_repository.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/opal/mca/base/mca_base_component_repository.c b/opal/mca/base/mca_base_component_repository.c index b55e84352d..befd6b8325 100644 --- a/opal/mca/base/mca_base_component_repository.c +++ b/opal/mca/base/mca_base_component_repository.c @@ -209,10 +209,12 @@ int mca_base_component_repository_link(const char *src_type, void mca_base_component_repository_release(const mca_base_component_t *component) { #if OMPI_WANT_LIBLTDL - repository_item_t *ri = find_component(component->mca_type_name, - component->mca_component_name); - if (NULL != ri) { - OBJ_RELEASE(ri); + if (initialized) { + repository_item_t *ri = find_component(component->mca_type_name, + component->mca_component_name); + if (NULL != ri) { + OBJ_RELEASE(ri); + } } #endif }