mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-05-04 12:41:00 +02:00
BUG/MEDIUM: dns: fix multiple double close on fd in dns.c
It seems that fd_delete perform the close of the file descriptor Se we must not close the fd once again after that. This should fix issues #1128, #1130 and #1131
This commit is contained in:
parent
0e40fda16a
commit
267221557f
@ -117,7 +117,6 @@ int dns_send_nameserver(struct dns_nameserver *ns, void *buf, size_t len)
|
||||
}
|
||||
ns->counters->snd_error++;
|
||||
fd_delete(fd);
|
||||
close(fd);
|
||||
dgram->t.sock.fd = -1;
|
||||
return -1;
|
||||
}
|
||||
@ -164,7 +163,6 @@ ssize_t dns_recv_nameserver(struct dns_nameserver *ns, void *data, size_t size)
|
||||
return 0;
|
||||
}
|
||||
fd_delete(fd);
|
||||
close(fd);
|
||||
dgram->t.sock.fd = -1;
|
||||
return -1;
|
||||
}
|
||||
@ -342,7 +340,6 @@ static void dns_resolve_send(struct dgram_conn *dgram)
|
||||
}
|
||||
ns->counters->snd_error++;
|
||||
fd_delete(fd);
|
||||
close(fd);
|
||||
fd = dgram->t.sock.fd = -1;
|
||||
goto out;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user