handle_established_connection(): Don't mess with csp->ssl_with_(server|client)_is_opened
authorFabian Keil <fk@fabiankeil.de>
Sun, 1 Mar 2020 14:31:24 +0000 (15:31 +0100)
committerFabian Keil <fk@fabiankeil.de>
Sun, 1 Mar 2020 16:44:27 +0000 (17:44 +0100)
This was a mismerge in 2111876638. The original code did
it in chat() were it doesn't hurt. Actually we don't need
to do it at all, as the variables are initialized to 0.

Zeroing the variables in handle_established_connection()
caused memory leaks as close_server_ssl_connection() and
close_client_ssl_connection() returned early,

Sponsored by: Robert Klemme

jcc.c

diff --git a/jcc.c b/jcc.c
index 3809f40..f142996 100644 (file)
--- a/jcc.c
+++ b/jcc.c
@@ -2410,13 +2410,6 @@ static void handle_established_connection(struct client_state *csp)
    int use_ssl_tunnel = 0;
    csp->dont_verify_certificate = 0;
 
    int use_ssl_tunnel = 0;
    csp->dont_verify_certificate = 0;
 
-   /*
-    * Preset flags informing if SSL connections with server or client
-    * are opened or closed
-    */
-   csp->ssl_with_server_is_opened = 0;
-   csp->ssl_with_client_is_opened = 0;
-
    if (csp->http->ssl && !(csp->action->flags & ACTION_HTTPS_INSPECTION))
    {
       /* Pass encrypted content without filtering. */
    if (csp->http->ssl && !(csp->action->flags & ACTION_HTTPS_INSPECTION))
    {
       /* Pass encrypted content without filtering. */