mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 22:01:31 +02:00
CLEANUP: resolvers: Use ha_free() in srvrq_resolution_error_cb()
Two occurrences to "free(A);A=NULL;" may be replaced by a call to ha_free() in the srvrq_resolution_error_cb() function.
This commit is contained in:
parent
e8674c7184
commit
c392d461d6
@ -3296,12 +3296,10 @@ int srvrq_resolution_error_cb(struct resolv_requester *requester, int error_code
|
||||
if (s->srvrq == srvrq) {
|
||||
resolv_unlink_resolution(s->resolv_requester, 1);
|
||||
srvrq_update_srv_status(s, 1);
|
||||
free(s->hostname);
|
||||
free(s->hostname_dn);
|
||||
s->hostname = NULL;
|
||||
s->hostname_dn = NULL;
|
||||
s->hostname_dn_len = 0;
|
||||
memset(&s->addr, 0, sizeof(s->addr));
|
||||
ha_free(&s->hostname);
|
||||
ha_free(&s->hostname_dn);
|
||||
s->hostname_dn_len = 0;
|
||||
s->svc_port = 0;
|
||||
}
|
||||
HA_SPIN_UNLOCK(SERVER_LOCK, &s->lock);
|
||||
|
Loading…
x
Reference in New Issue
Block a user