diff options
Diffstat (limited to 'xlators/meta/src/meta.c')
-rw-r--r-- | xlators/meta/src/meta.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/xlators/meta/src/meta.c b/xlators/meta/src/meta.c index 7ea01ab147b..4c4d671f59d 100644 --- a/xlators/meta/src/meta.c +++ b/xlators/meta/src/meta.c @@ -226,17 +226,22 @@ mem_acct_init (xlator_t *this) int init (xlator_t *this) { - meta_priv_t *priv = NULL; + meta_priv_t *priv = NULL; + int ret = -1; - priv = GF_CALLOC (sizeof(*priv), 1, gf_meta_mt_priv_t); - if (!priv) - return -1; + priv = GF_CALLOC (sizeof(*priv), 1, gf_meta_mt_priv_t); + if (!priv) + return ret; - GF_OPTION_INIT ("meta-dir-name", priv->meta_dir_name, str, out); + GF_OPTION_INIT ("meta-dir-name", priv->meta_dir_name, str, out); - this->private = priv; + this->private = priv; + ret = 0; out: - return 0; + if (ret) + GF_FREE (priv); + + return ret; } |