From 8885b3463723e0309ac39d529b267a897dcc5027 Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Wed, 10 Jun 2015 15:10:57 +0900 Subject: [PATCH] mca/base: fix a misc memory leak as reported by Coverity with CID 1294415 --- opal/mca/base/mca_base_component_repository.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/opal/mca/base/mca_base_component_repository.c b/opal/mca/base/mca_base_component_repository.c index b2eb70bf58..47129035e4 100644 --- a/opal/mca/base/mca_base_component_repository.c +++ b/opal/mca/base/mca_base_component_repository.c @@ -13,6 +13,8 @@ * Copyright (c) 2008-2015 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -91,6 +93,7 @@ static int process_repository_item (const char *filename, void *data) STRINGIFY(MCA_BASE_MAX_COMPONENT_NAME_LEN) "s", type, name); if (0 > ret) { /* does not patch the expected template. skip */ + free(base); return OPAL_SUCCESS; }