From 656711d935000c161012c25340dbd65a59999dc3 Mon Sep 17 00:00:00 2001 From: Humble Chirammal Date: Fri, 9 May 2014 15:30:04 +0530 Subject: mem_acct : Check return value of xlator_mem_acct_init(). some code does not check xlator_mem_acct_init() return, thus fails to capture wrong memory accounting initialization. This patch fix the same. Change-Id: I01eab19d6cef472afd850b0f964132c01523492a BUG: 1123768 Signed-off-by: Humble Chirammal Reviewed-on: http://review.gluster.org/7728 Tested-by: Gluster Build System Reviewed-by: Niels de Vos Reviewed-by: Kaleb KEITHLEY --- cli/src/cli.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'cli') diff --git a/cli/src/cli.c b/cli/src/cli.c index 992f6a54321..6d9f5f6c158 100644 --- a/cli/src/cli.c +++ b/cli/src/cli.c @@ -97,8 +97,12 @@ glusterfs_ctx_defaults_init (glusterfs_ctx_t *ctx) cmd_args_t *cmd_args = NULL; struct rlimit lim = {0, }; call_pool_t *pool = NULL; + int ret = -1; - xlator_mem_acct_init (THIS, cli_mt_end); + ret = xlator_mem_acct_init (THIS, cli_mt_end); + if (ret != 0) { + return ret; + } ctx->process_uuid = generate_glusterfs_ctx_id (); if (!ctx->process_uuid) -- cgit