diff options
Diffstat (limited to 'xlators/cluster/dht/src/nufa.c')
-rw-r--r-- | xlators/cluster/dht/src/nufa.c | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/xlators/cluster/dht/src/nufa.c b/xlators/cluster/dht/src/nufa.c index edb900f763a..0d8241f41a5 100644 --- a/xlators/cluster/dht/src/nufa.c +++ b/xlators/cluster/dht/src/nufa.c @@ -513,21 +513,21 @@ fini (xlator_t *this) if (conf) { if (conf->file_layouts) { for (i = 0; i < conf->subvolume_cnt; i++) { - FREE (conf->file_layouts[i]); + GF_FREE (conf->file_layouts[i]); } - FREE (conf->file_layouts); + GF_FREE (conf->file_layouts); } if (conf->default_dir_layout) - FREE (conf->default_dir_layout); + GF_FREE (conf->default_dir_layout); if (conf->subvolumes) - FREE (conf->subvolumes); + GF_FREE (conf->subvolumes); if (conf->subvolume_status) - FREE (conf->subvolume_status); + GF_FREE (conf->subvolume_status); - FREE (conf); + GF_FREE (conf); } return; @@ -557,7 +557,8 @@ init (xlator_t *this) "dangling volume. check volfile"); } - conf = CALLOC (1, sizeof (*conf)); + conf = GF_CALLOC (1, sizeof (*conf), + gf_dht_mt_dht_conf_t); if (!conf) { gf_log (this->name, GF_LOG_ERROR, "Out of memory"); @@ -642,7 +643,8 @@ init (xlator_t *this) } } - conf->du_stats = CALLOC (conf->subvolume_cnt, sizeof (dht_du_t)); + conf->du_stats = GF_CALLOC (conf->subvolume_cnt, sizeof (dht_du_t), + gf_dht_mt_dht_du_t); if (!conf->du_stats) { gf_log (this->name, GF_LOG_ERROR, "Out of memory"); @@ -657,24 +659,24 @@ err: if (conf) { if (conf->file_layouts) { for (i = 0; i < conf->subvolume_cnt; i++) { - FREE (conf->file_layouts[i]); + GF_FREE (conf->file_layouts[i]); } - FREE (conf->file_layouts); + GF_FREE (conf->file_layouts); } if (conf->default_dir_layout) - FREE (conf->default_dir_layout); + GF_FREE (conf->default_dir_layout); if (conf->subvolumes) - FREE (conf->subvolumes); + GF_FREE (conf->subvolumes); if (conf->subvolume_status) - FREE (conf->subvolume_status); + GF_FREE (conf->subvolume_status); if (conf->du_stats) - FREE (conf->du_stats); + GF_FREE (conf->du_stats); - FREE (conf); + GF_FREE (conf); } return -1; |