mirror of
https://github.com/sonertari/SSLproxy
synced 2024-10-31 21:20:21 +00:00
Fix file descriptor leak, thanks to @disaykin
This commit is contained in:
parent
fc7d57469d
commit
d48ba1da9a
@ -402,7 +402,7 @@ logpkt_pcap_build(uint8_t *pkt,
|
||||
sizeof(ip6_hdr->src_addr));
|
||||
CHKSUM_ADD_RANGE(sum, ip6_hdr->dst_addr,
|
||||
sizeof(ip6_hdr->dst_addr));
|
||||
CHKSUM_ADD_UINT32(sum, ip6_hdr->len);
|
||||
CHKSUM_ADD_UINT32(sum, (uint32_t)ip6_hdr->len);
|
||||
CHKSUM_ADD_UINT16(sum, htons(IPPROTO_TCP));
|
||||
}
|
||||
tcp_hdr->seq = htonl(seq);
|
||||
|
@ -232,6 +232,7 @@ privsep_server_openfile(const char *fn, int mkpath)
|
||||
log_err_level_printf(LOG_CRIT, "Failed to seek on '%s': %s (%i)\n",
|
||||
fn, strerror(errno), errno);
|
||||
errno = tmp;
|
||||
close(fd);
|
||||
return -1;
|
||||
}
|
||||
return fd;
|
||||
|
Loading…
Reference in New Issue
Block a user