summaryrefslogtreecommitdiffstats
path: root/glusterfsd
diff options
context:
space:
mode:
authorAtin Mukherjee <amukherj@redhat.com>2016-12-06 16:21:41 +0530
committerNiels de Vos <ndevos@redhat.com>2017-01-02 05:09:08 -0800
commited3fb30254af39e560d09466c6a755d6e0e4b32d (patch)
tree94d1f3fb796cc504aff167492c303ada08d577f1 /glusterfsd
parentaaf2a2897080754aceb42245e92b0269556d6f38 (diff)
glusterfsd : fix null pointer dereference in glusterfs_handle_barrier
>Reviewed-on: http://review.gluster.org/16043 >Smoke: Gluster Build System <jenkins@build.gluster.org> >CentOS-regression: Gluster Build System <jenkins@build.gluster.org> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >Reviewed-by: Vijay Bellur <vbellur@redhat.com> Change-Id: Iab86a3c4970e54c22d3170e68708e0ea432a8ea4 BUG: 1402697 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/16066 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'glusterfsd')
-rw-r--r--glusterfsd/src/glusterfsd-mgmt.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c
index 1336190b5b9..c47fa3883c9 100644
--- a/glusterfsd/src/glusterfsd-mgmt.c
+++ b/glusterfsd/src/glusterfsd-mgmt.c
@@ -1321,10 +1321,14 @@ glusterfs_handle_barrier (rpcsvc_request_t *req)
req->rpc_err = GARBAGE_ARGS;
goto out;
}
+ ret = -1;
ctx = glusterfsd_ctx;
- GF_ASSERT (ctx);
+ GF_VALIDATE_OR_GOTO (THIS->name, ctx, out);
+
active = ctx->active;
+ GF_VALIDATE_OR_GOTO (THIS->name, active, out);
+
any = active->first;
dict = dict_new();