cli: Error out when there is not enough memory
Change-Id: Ia8d061de5be1343cc10a945f6cf011686a770d33 BUG: 1211594 Signed-off-by: Humble Devassy Chirammal <hchiramm@redhat.com> Reviewed-on: http://review.gluster.org/10144 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System Reviewed-by: Vijay Bellur <vbellur@redhat.com>
This commit is contained in:
parent
557ea3781e
commit
f6e24fc544
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user