From 232882ac6f93ebac847715f522a99960bcfb11a6 Mon Sep 17 00:00:00 2001 From: Kinglong Mee Date: Thu, 20 Apr 2017 02:08:32 -0400 Subject: io-stats: fix some memory leak after fini Change-Id: Id057b711d7f615c6d2db1ebbca2f17d0afacb2ae BUG: 1444023 Signed-off-by: Kinglong Mee Reviewed-on: https://review.gluster.org/17089 Reviewed-by: Niels de Vos Tested-by: Niels de Vos Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System --- xlators/debug/io-stats/src/io-stats.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xlators/debug/io-stats/src/io-stats.c b/xlators/debug/io-stats/src/io-stats.c index ac99f98d85..d9d1e1dff1 100644 --- a/xlators/debug/io-stats/src/io-stats.c +++ b/xlators/debug/io-stats/src/io-stats.c @@ -3663,6 +3663,7 @@ ios_destroy_top_stats (struct ios_conf *conf) GF_FREE (list); list_head->members--; } + GF_FREE (list_head->iosstats); } for (i = 0; i < IOS_STATS_THRU_MAX; i++) { @@ -3678,6 +3679,7 @@ ios_destroy_top_stats (struct ios_conf *conf) GF_FREE (list); list_head->members--; } + GF_FREE (list_head->iosstats); } UNLOCK (&conf->lock); @@ -3880,7 +3882,9 @@ ios_conf_destroy (struct ios_conf *conf) ios_destroy_top_stats (conf); _ios_destroy_dump_thread (conf); + ios_destroy_sample_buf (conf->ios_sample_buf); LOCK_DESTROY (&conf->lock); + GF_FREE(conf->dnscache); GF_FREE(conf); } -- cgit