diff options
author | Amar Tumballi <amar@gluster.com> | 2010-09-21 22:22:45 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-09-21 22:36:56 -0700 |
commit | 7655ccebd46936a42a6edb62184455077a6505fd (patch) | |
tree | b521f6c24ae5eed35a21306a64c1b389fccb40d5 | |
parent | a2688982b7694f18d6a1d7e20ab36274cca9cc27 (diff) |
server-helper: check for conf before dereferencing
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 1667 ()
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1667
-rw-r--r-- | xlators/protocol/server/src/server-helpers.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xlators/protocol/server/src/server-helpers.c b/xlators/protocol/server/src/server-helpers.c index 85d157f5f8a..3dbd007ce99 100644 --- a/xlators/protocol/server/src/server-helpers.c +++ b/xlators/protocol/server/src/server-helpers.c @@ -1108,7 +1108,7 @@ server_print_reply (call_frame_t *frame, int op_ret, int op_errno) this = frame->this; conf = this->private; - if (!conf->trace) + if (!conf || !conf->trace) return; state = CALL_STATE (frame); @@ -1153,11 +1153,11 @@ server_print_request (call_frame_t *frame) this = frame->this; conf = this->private; - state = CALL_STATE (frame); - - if (!conf->trace) + if (!conf || !conf->trace) return; + state = CALL_STATE (frame); + memset (resolve_vars, '\0', 256); memset (resolve2_vars, '\0', 256); memset (loc_vars, '\0', 256); |