summaryrefslogtreecommitdiffstats
path: root/glusterfsd
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2012-03-12 18:28:31 +0530
committerVijay Bellur <vijay@gluster.com>2012-03-12 07:59:22 -0700
commit05318789c5dbc92634a03e355acddbffb122b64e (patch)
treefc70458d1151abd91dd45cf86412e0965a805098 /glusterfsd
parent58776c0800ab146b1dd9a8461a98ca719afff6ef (diff)
glusterfsd: handle a case of NULL dereference during rebalance
Change-Id: I9dbe1235f9b5eb7dd43c92bd46830ed9e5734768 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 801787 Reviewed-on: http://review.gluster.com/2924 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Diffstat (limited to 'glusterfsd')
-rw-r--r--glusterfsd/src/glusterfsd-mgmt.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c
index 6e00cd1..57c6649 100644
--- a/glusterfsd/src/glusterfsd-mgmt.c
+++ b/glusterfsd/src/glusterfsd-mgmt.c
@@ -762,6 +762,11 @@ glusterfs_handle_defrag (rpcsvc_request_t *req)
GF_ASSERT (ctx);
active = ctx->active;
+ if (!active) {
+ req->rpc_err = GARBAGE_ARGS;
+ goto out;
+ }
+
any = active->first;
if (!xdr_to_generic (req->msg[0], &xlator_req,
(xdrproc_t)xdr_gd1_mgmt_brick_op_req)) {