diff options
| -rw-r--r-- | tcpd/libcouriergnutls.c | 2 | ||||
| -rw-r--r-- | tcpd/libcouriertls.c | 3 | ||||
| -rw-r--r-- | tcpd/starttls.c | 1 |
3 files changed, 6 insertions, 0 deletions
diff --git a/tcpd/libcouriergnutls.c b/tcpd/libcouriergnutls.c index 5fc0ef9..1b4bfe2 100644 --- a/tcpd/libcouriergnutls.c +++ b/tcpd/libcouriergnutls.c @@ -1046,6 +1046,7 @@ static int get_server_cert(gnutls_session_t session, { if (ssl->ctx->certfile) nonsslerror(&ssl->info_cpy, ssl->ctx->certfile); + free(vhost_buf); return 0; } @@ -1053,6 +1054,7 @@ static int get_server_cert(gnutls_session_t session, free(certfilename); if (keyfilename) free(keyfilename); + free(vhost_buf); return rc; } diff --git a/tcpd/libcouriertls.c b/tcpd/libcouriertls.c index 5105030..874a0d1 100644 --- a/tcpd/libcouriertls.c +++ b/tcpd/libcouriertls.c @@ -445,6 +445,9 @@ static void load_dh_params(SSL_CTX *ctx, const char *filename, static int check_readable_file(const char *filename) { + if (!filename) + return 0; + return (access(filename, R_OK) == 0) ? 1 : 0; } diff --git a/tcpd/starttls.c b/tcpd/starttls.c index e7b805f..76fcf3b 100644 --- a/tcpd/starttls.c +++ b/tcpd/starttls.c @@ -550,6 +550,7 @@ static int dossl(int fd, int argn, int argc, char **argv) if (!ssl) { close(fd); + tls_destroy(ctx); return (1); } |
