mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 14:21:25 +02:00
CLEANUP: Stop checking the pointer before calling ring_free()
Changes performed with this Coccinelle patch: @@ expression e; @@ - if (e != NULL) { ring_free(e); - } @@ expression e; @@ - if (e) { ring_free(e); - } @@ expression e; @@ - if (e) ring_free(e); @@ expression e; @@ - if (e != NULL) ring_free(e);
This commit is contained in:
parent
fe83f58906
commit
1307cd42d2
@ -421,7 +421,6 @@ int dns_dgram_init(struct dns_nameserver *ns, struct sockaddr_storage *sk)
|
||||
}
|
||||
return 0;
|
||||
out:
|
||||
if (dgram->ring_req)
|
||||
ring_free(dgram->ring_req);
|
||||
|
||||
free(dgram);
|
||||
|
@ -2484,12 +2484,10 @@ static void resolvers_destroy(struct resolvers *resolvers)
|
||||
fd_delete(ns->dgram->conn.t.sock.fd);
|
||||
close(ns->dgram->conn.t.sock.fd);
|
||||
}
|
||||
if (ns->dgram->ring_req)
|
||||
ring_free(ns->dgram->ring_req);
|
||||
free(ns->dgram);
|
||||
}
|
||||
if (ns->stream) {
|
||||
if (ns->stream->ring_req)
|
||||
ring_free(ns->stream->ring_req);
|
||||
task_destroy(ns->stream->task_req);
|
||||
task_destroy(ns->stream->task_rsp);
|
||||
|
@ -1164,7 +1164,6 @@ error:
|
||||
free(sft);
|
||||
|
||||
if (sink) {
|
||||
if (sink->ctx.ring)
|
||||
ring_free(sink->ctx.ring);
|
||||
|
||||
LIST_DELETE(&sink->sink_list);
|
||||
|
Loading…
x
Reference in New Issue
Block a user