From 536003599541afebd9383cc5f2850bd6397dcfc5 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Sat, 24 Mar 2018 06:40:38 -0700 Subject: [PATCH] topo/treematch: fix CID 1416327 Ensure to free things in the right order so that we don't access memory after it is freed. Signed-off-by: Jeff Squyres --- ompi/mca/topo/treematch/treematch/tm_tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ompi/mca/topo/treematch/treematch/tm_tree.c b/ompi/mca/topo/treematch/treematch/tm_tree.c index 946f01b69c..ffac4e7615 100644 --- a/ompi/mca/topo/treematch/treematch/tm_tree.c +++ b/ompi/mca/topo/treematch/treematch/tm_tree.c @@ -132,8 +132,8 @@ void free_non_constraint_tree(tm_tree_t *tree) { int d = tree->dumb; - free_list_child(tree); free_tab_child(tree); + free_list_child(tree); if(!d) FREE(tree); }