free_server_ssl_structures(): Mark the correct socket as invalid
authorFabian Keil <fk@fabiankeil.de>
Tue, 25 Feb 2020 12:23:32 +0000 (13:23 +0100)
committerFabian Keil <fk@fabiankeil.de>
Wed, 26 Feb 2020 07:28:08 +0000 (08:28 +0100)
Sponsored by: Robert Klemme

ssl.c

diff --git a/ssl.c b/ssl.c
index ccc1b10..067e7e0 100644 (file)
--- a/ssl.c
+++ b/ssl.c
@@ -907,7 +907,7 @@ static void free_server_ssl_structures(struct client_state *csp)
    * function, we change fd to -1, which is the same what does
    * rest of mbedtls_net_free function.
    */
-   csp->mbedtls_client_attr.socket_fd.fd = -1;
+   csp->mbedtls_server_attr.socket_fd.fd = -1;
 
    mbedtls_x509_crt_free(&(csp->mbedtls_server_attr.ca_cert));
    mbedtls_ssl_free(&(csp->mbedtls_server_attr.ssl));