diff options
-rw-r--r-- | libglusterfs/src/xlator.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c index 23cf89af026..b58247e52bc 100644 --- a/libglusterfs/src/xlator.c +++ b/libglusterfs/src/xlator.c @@ -502,6 +502,9 @@ xlator_mem_acct_init (xlator_t *xl, int num_types) if (!xl) return -1; + if (!xl->ctx) + return -1; + if (!xl->ctx->mem_acct_enable) return 0; |