From 0e222925d3a1c5b31fc40d0bb5026cfde639ac95 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Mon, 13 Feb 2012 16:21:23 +0000 Subject: [PATCH] -fix coverity --- src/testing/testing_group.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/testing/testing_group.c b/src/testing/testing_group.c index 377f4d550..ae08136e3 100644 --- a/src/testing/testing_group.c +++ b/src/testing/testing_group.c @@ -5183,7 +5183,10 @@ GNUNET_TESTING_get_statistics (struct GNUNET_TESTING_PeerGroup *pg, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Retrieving stats from %u total instances.\n", total_count); - stats_context->total = total_count; + if (0 != total_count) + stats_context->total = total_count; + else + GNUNET_free (stats_context); if (stats_list != NULL) { pos = stats_list; -- 2.25.1