diff options
Diffstat (limited to 'cli')
-rw-r--r-- | cli/src/cli-rpc-ops.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c index e8a81cd6523..769fdb62330 100644 --- a/cli/src/cli-rpc-ops.c +++ b/cli/src/cli-rpc-ops.c @@ -7050,7 +7050,11 @@ gf_cli_status_cbk (struct rpc_req *req, struct iovec *iov, } status.brick = GF_CALLOC (1, PATH_MAX + 256, gf_common_mt_strdup); - + if (!status.brick) { + errno = ENOMEM; + ret = -1; + goto out; + } switch (cmd & GF_CLI_STATUS_MASK) { case GF_CLI_STATUS_MEM: cli_print_volume_status_mem (dict, notbrick); |