tlsgate

TLS reverse proxy
git clone git://git.akobets.xyz/tlsgate
Log | Files | Refs | README | LICENSE

commit 680df18d0383e047db7eb6605e5e1b8c20cd5a8e
parent bcb76f65c45393789d0eca9b17ce8c52723efbcd
Author: Artem Kobets <artem@akobets.xyz>
Date:   Thu,  1 Oct 2020 20:23:34 +0300

fix possible close(sfd) with undefined sfd

Diffstat:
Mmain.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/main.c b/main.c @@ -46,7 +46,7 @@ serve(const struct settings *s, int cfd, const struct sockaddr_storage *addr) char addr_str[INET6_ADDRSTRLEN]; // > INET_ADDRSTRLEN char tstmp[21]; - int sfd, fd_tls = -1, fd_norm = -1; + int sfd = -1, fd_tls, fd_norm; struct tls *tls_ctx = NULL; int nready; int ret; @@ -441,6 +441,7 @@ main(int argc, char **argv) case 0: serve(&s, cfd, &addr); exit(0); + break; case -1: warn("fork"); close(cfd);