Skip to content

Commit 11e5f86

Browse files
committed
mpool/base: plug a memory leak
set the key of all mpool_tree_item objects, so they can be retrieved in mpool_base_free and then returned back to the mca_mpool_base_tree_item_free_list free list. Refs. #4567 Thanks Philip Blakely for the bug report. Signed-off-by: Gilles Gouaillardet <[email protected]>
1 parent 2e74bef commit 11e5f86

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

opal/mca/mpool/base/mpool_base_alloc.c

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
* Copyright (c) 2010-2017 IBM Corporation. All rights reserved.
1515
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
1616
* reserved.
17+
* Copyright (c) 2017 Research Organization for Information Science
18+
* and Technology (RIST). All rights reserved.
1719
* $COPYRIGHT$
1820
*
1921
* Additional copyrights may follow
@@ -84,6 +86,7 @@ void *mca_mpool_base_alloc(size_t size, opal_info_t *info, const char *hints)
8486
mca_mpool_base_tree_item_put (mpool_tree_item);
8587
} else {
8688
mpool_tree_item->mpool = mpool;
89+
mpool_tree_item->key = mem;
8790
mca_mpool_base_tree_insert (mpool_tree_item);
8891
}
8992

0 commit comments

Comments
 (0)