summaryrefslogtreecommitdiffstats
path: root/glusterfsd
diff options
context:
space:
mode:
Diffstat (limited to 'glusterfsd')
-rw-r--r--glusterfsd/src/glusterfsd-mgmt.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c
index 7122fc0d127..f1b2f9e7123 100644
--- a/glusterfsd/src/glusterfsd-mgmt.c
+++ b/glusterfsd/src/glusterfsd-mgmt.c
@@ -1127,8 +1127,23 @@ glusterfs_handle_brick_status (rpcsvc_request_t *req)
}
ctx = glusterfsd_ctx;
- GF_ASSERT (ctx);
+ if (ctx == NULL) {
+ gf_log (this->name, GF_LOG_ERROR, "ctx returned NULL");
+ ret = -1;
+ goto out;
+ }
+ if (ctx->active == NULL) {
+ gf_log (this->name, GF_LOG_ERROR, "ctx->active returned NULL");
+ ret = -1;
+ goto out;
+ }
active = ctx->active;
+ if (ctx->active->first == NULL) {
+ gf_log (this->name, GF_LOG_ERROR, "ctx->active->first "
+ "returned NULL");
+ ret = -1;
+ goto out;
+ }
server_xl = active->first;
brick_xl = get_xlator_by_name (server_xl, brickname);