From c72aca8570e7fe605df7f74fe948db0ca15c8c2a Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Sun, 25 Nov 2012 12:37:58 +0100 Subject: [PATCH] plug a memleak in that example --- examples/msg/actions/actions.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/msg/actions/actions.c b/examples/msg/actions/actions.c index 22e5961ea6..746afe2071 100644 --- a/examples/msg/actions/actions.c +++ b/examples/msg/actions/actions.c @@ -482,7 +482,11 @@ static void action_allReduce(const char *const *action) { XBT_DEBUG("%s: %s has received", allreduce_identifier, process_name); } - XBT_VERB("%s %f", xbt_str_join_array(action, " "), MSG_get_clock() - clock); + if (XBT_LOG_ISENABLED(actions,xbt_log_priority_verbose)) { + char *a = xbt_str_join_array(action, " "); + XBT_VERB("%s %f", a, MSG_get_clock() - clock); + free(a); + } free(allreduce_identifier); } -- 2.20.1