From 05318789c5dbc92634a03e355acddbffb122b64e Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Mon, 12 Mar 2012 18:28:31 +0530 Subject: glusterfsd: handle a case of NULL dereference during rebalance Change-Id: I9dbe1235f9b5eb7dd43c92bd46830ed9e5734768 Signed-off-by: Amar Tumballi BUG: 801787 Reviewed-on: http://review.gluster.com/2924 Tested-by: Gluster Build System Reviewed-by: Jeff Darcy --- glusterfsd/src/glusterfsd-mgmt.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'glusterfsd/src/glusterfsd-mgmt.c') diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c index 6e00cd1fd..57c664920 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)) { -- cgit