Skip to content

Commit ff74615

Browse files
ggouaillardetawlauria
authored andcommitted
mpool/base: silence a valgrind warning
by adding a constructor to mca_mpool_base_tree_item_t Signed-off-by: Gilles Gouaillardet <[email protected]>
1 parent 4d92b5f commit ff74615

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

opal/mca/mpool/base/mpool_base_tree.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* Copyright (c) 2010 IBM Corporation. All rights reserved.
1616
* Copyright (c) 2012-2015 Los Alamos National Security, LLC.
1717
* All rights reserved.
18-
* Copyright (c) 2015 Research Organization for Information Science
18+
* Copyright (c) 2015-2018 Research Organization for Information Science
1919
* and Technology (RIST). All rights reserved.
2020
* Copyright (c) 2018 Amazon.com, Inc. or its affiliates. All Rights reserved.
2121
* $COPYRIGHT$
@@ -43,7 +43,11 @@ static char *leak_msg = NULL;
4343
static int condition(void *value);
4444
static void action(void *key, void *value);
4545

46-
OBJ_CLASS_INSTANCE(mca_mpool_base_tree_item_t, opal_free_list_item_t, NULL, NULL);
46+
static void mpbtcons(mca_mpool_base_tree_item_t *item) {
47+
item->key = NULL;
48+
}
49+
50+
OBJ_CLASS_INSTANCE(mca_mpool_base_tree_item_t, opal_free_list_item_t, mpbtcons, NULL);
4751

4852
/*
4953
* use globals for the tree and the tree_item free list..

0 commit comments

Comments
 (0)