summaryrefslogtreecommitdiffstats
path: root/api/src/glfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'api/src/glfs.c')
-rw-r--r--api/src/glfs.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/api/src/glfs.c b/api/src/glfs.c
index fc0e7c7ba91..e74329caf9d 100644
--- a/api/src/glfs.c
+++ b/api/src/glfs.c
@@ -66,11 +66,15 @@ glusterfs_ctx_defaults_init (glusterfs_ctx_t *ctx)
call_pool_t *pool = NULL;
int ret = -1;
- xlator_mem_acct_init (THIS, glfs_mt_end + 1);
-
if (!ctx) {
goto err;
- }
+ }
+ ret = xlator_mem_acct_init (THIS, glfs_mt_end + 1);
+ if (ret != 0) {
+ gf_log(THIS->name, GF_LOG_ERROR,
+ "Memory accounting init failed");
+ return ret;
+ }
ctx->process_uuid = generate_glusterfs_ctx_id ();
if (!ctx->process_uuid) {