From e0d9e6553f2cb960395b554205d89ff2510dda24 Mon Sep 17 00:00:00 2001 From: Nathan Hjelm Date: Mon, 5 Oct 2015 10:48:56 -0600 Subject: [PATCH] mpool: mpi_show_mpi_alloc_mem_leaks don't print out message if there are no leaks Signed-off-by: Nathan Hjelm --- opal/mca/mpool/base/mpool_base_tree.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/opal/mca/mpool/base/mpool_base_tree.c b/opal/mca/mpool/base/mpool_base_tree.c index bcdbbf1e64..c59ec01c51 100644 --- a/opal/mca/mpool/base/mpool_base_tree.c +++ b/opal/mca/mpool/base/mpool_base_tree.c @@ -182,6 +182,9 @@ void mca_mpool_base_tree_print(int show_up_to_mem_leaks) num_leaks = 0; max_mem_leaks = show_up_to_mem_leaks; opal_rb_tree_traverse(&mca_mpool_base_tree, condition, action); + if (0 == num_leaks) { + return; + } if (num_leaks <= show_up_to_mem_leaks || show_up_to_mem_leaks < 0) {