diff options
author | Yaniv Kaul <ykaul@redhat.com> | 2019-03-20 13:05:44 +0200 |
---|---|---|
committer | MOHIT AGRAWAL <moagrawa@redhat.com> | 2019-03-21 04:57:14 +0000 |
commit | cba59f6cb7fe4e2b9e6b7e7f35c9d659b5fa5450 (patch) | |
tree | 0cffab4f26525c911414667459321c8879787888 /xlators | |
parent | 3fadf5cc41d5ea3195d2228d23e890f27fc22f87 (diff) |
server.c: fix Coverity CID 1399758
1399758 Dereference before null check
It was introduced @ commit 67f48bfcc16a38052e6c9ae7c25e69b03b8ae008
updates: bz#1691187
> updates: bz#789278
> Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
> Change-Id: I1424b008b240691fe2a8924e31c708d0fb4f362d
> (cherry picked from commit 8aff9cc5c6277ef7dacfb89f1392b7c2eda9b825)
Change-Id: Ie2160fb9ae9cdeacf845e849da7f6001b3b6b10b
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/protocol/server/src/server.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c index b4b447b34fc..c90217e2f03 100644 --- a/xlators/protocol/server/src/server.c +++ b/xlators/protocol/server/src/server.c @@ -438,7 +438,6 @@ server_rpc_notify(rpcsvc_t *rpc, void *xl, rpcsvc_event_t event, void *data) this = xl; trans = data; - conf = this->private; if (!this || !data || !this->ctx || !this->ctx->active) { gf_msg_callingfn("server", GF_LOG_WARNING, 0, PS_MSG_RPC_NOTIFY_ERROR, @@ -446,6 +445,8 @@ server_rpc_notify(rpcsvc_t *rpc, void *xl, rpcsvc_event_t event, void *data) goto out; } + conf = this->private; + switch (event) { case RPCSVC_EVENT_ACCEPT: { /* Have a structure per new connection */ |