From ff746153d7b5bf004d586e25c3cb0370ba43d6da Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Tue, 29 Nov 2016 16:36:57 +0900 Subject: [PATCH] mpool/base: silence a valgrind warning by adding a constructor to mca_mpool_base_tree_item_t Signed-off-by: Gilles Gouaillardet --- opal/mca/mpool/base/mpool_base_tree.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/opal/mca/mpool/base/mpool_base_tree.c b/opal/mca/mpool/base/mpool_base_tree.c index 5d7adc25e7..201cffdd36 100644 --- a/opal/mca/mpool/base/mpool_base_tree.c +++ b/opal/mca/mpool/base/mpool_base_tree.c @@ -15,7 +15,7 @@ * Copyright (c) 2010 IBM Corporation. All rights reserved. * Copyright (c) 2012-2015 Los Alamos National Security, LLC. * All rights reserved. - * Copyright (c) 2015 Research Organization for Information Science + * Copyright (c) 2015-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. * Copyright (c) 2018 Amazon.com, Inc. or its affiliates. All Rights reserved. * $COPYRIGHT$ @@ -43,7 +43,11 @@ static char *leak_msg = NULL; static int condition(void *value); static void action(void *key, void *value); -OBJ_CLASS_INSTANCE(mca_mpool_base_tree_item_t, opal_free_list_item_t, NULL, NULL); +static void mpbtcons(mca_mpool_base_tree_item_t *item) { + item->key = NULL; +} + +OBJ_CLASS_INSTANCE(mca_mpool_base_tree_item_t, opal_free_list_item_t, mpbtcons, NULL); /* * use globals for the tree and the tree_item free list..