client_t: fix for potential NULL pointer dereference
In case an error occurs, 'client' is free'd. The log message just before exiting the function should therefore not use the structure anymore. BUG: 789278 Change-Id: I0848328b29585057cd037a5972c4e5f06a7f978b CID: 1226165 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/9262 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
This commit is contained in:
parent
e679d6417d
commit
9ca8003921
@ -291,9 +291,10 @@ gf_client_get (xlator_t *this, struct rpcsvc_auth_data *cred, char *client_uid)
|
||||
unlock:
|
||||
UNLOCK (&clienttable->lock);
|
||||
|
||||
gf_log_callingfn ("client_t", GF_LOG_DEBUG, "%s: bind_ref: %d, ref: %d",
|
||||
client->client_uid, client->ref.bind,
|
||||
client->ref.count);
|
||||
if (client)
|
||||
gf_log_callingfn ("client_t", GF_LOG_DEBUG, "%s: bind_ref: %d, "
|
||||
"ref: %d", client->client_uid,
|
||||
client->ref.bind, client->ref.count);
|
||||
return client;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user