diff options
author | Raghavendra Bhat <raghavendrabhat@gluster.com> | 2010-09-21 03:51:57 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-09-21 03:24:09 -0700 |
commit | 7e4d13b56022dfe57fc1512e247eb030edec17fb (patch) | |
tree | c3234e7f8039e96a36262d8d48154bd11d06dc56 /xlators/protocol | |
parent | 0484b5768da303998549e8153d08899e58edab68 (diff) |
check the private structure of the xlator before accessing it
Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 1651 ()
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1651
Diffstat (limited to 'xlators/protocol')
-rw-r--r-- | xlators/protocol/client/src/client.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/xlators/protocol/client/src/client.c b/xlators/protocol/client/src/client.c index e3e143d58b2..58ac7d0e62e 100644 --- a/xlators/protocol/client/src/client.c +++ b/xlators/protocol/client/src/client.c @@ -1531,6 +1531,13 @@ client_rpc_notify (struct rpc_clnt *rpc, void *mydata, rpc_clnt_event_t event, int ret = 0; this = mydata; + if (!this || !this->private) { + gf_log ("client", GF_LOG_ERROR, + (this != NULL)?"private structure of the xlator this is NULL": + "xlator this is NULL"); + goto out; + } + conf = this->private; switch (event) { @@ -1572,6 +1579,7 @@ client_rpc_notify (struct rpc_clnt *rpc, void *mydata, rpc_clnt_event_t event, break; } +out: return 0; } |