io-stats: fix some memory leak after fini

Change-Id: Id057b711d7f615c6d2db1ebbca2f17d0afacb2ae
BUG: 1444023
Signed-off-by: Kinglong Mee <mijinlong@open-fs.com>
Reviewed-on: https://review.gluster.org/17089
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Niels de Vos <ndevos@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
This commit is contained in:
Kinglong Mee 2017-04-20 02:08:32 -04:00 committed by Niels de Vos
parent 9f5e59abfb
commit 232882ac6f

View File

@ -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);
}