From 030e9bc714f9ea51130bfea71dbb0d9139e7d615 Mon Sep 17 00:00:00 2001 From: Nathan Hjelm Date: Tue, 17 Feb 2015 12:15:31 -0700 Subject: [PATCH] mtl/ofi: fix mca variable usage error The fi_fabric function appears to free the provider string passed in in the fabric_attr. This causes MCA to free an invalid pointer when the parameter is freed. References #374 --- ompi/mca/mtl/ofi/mtl_ofi_component.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ompi/mca/mtl/ofi/mtl_ofi_component.c b/ompi/mca/mtl/ofi/mtl_ofi_component.c index b6004a751e..e237f40dfb 100644 --- a/ompi/mca/mtl/ofi/mtl_ofi_component.c +++ b/ompi/mca/mtl/ofi/mtl_ofi_component.c @@ -1,3 +1,4 @@ +/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ /* * Copyright (c) 2013-2014 Intel, Inc. All rights reserved * @@ -161,7 +162,7 @@ ompi_mtl_ofi_component_init(bool enable_progress_threads, */ domain_attr.threading = FI_THREAD_ENDPOINT; domain_attr.control_progress = FI_PROGRESS_AUTO; - fabric_attr.prov_name = ompi_mtl_ofi.provider_name; + fabric_attr.prov_name = strdup(ompi_mtl_ofi.provider_name); hints.domain_attr = &domain_attr; hints.fabric_attr = &fabric_attr;