X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=jcc.c;h=310fb1ee3ba8a495824b7f8f3ef9a37906c7f85a;hp=5f0b69e8bba95d07190a1549a2461233d9358481;hb=5c2e47de8805a1a489db8215a62859fd6b7e7d55;hpb=ea6b3f85afa7ce8efef05f5c1ec289fdf56cb1ff diff --git a/jcc.c b/jcc.c index 5f0b69e8..310fb1ee 100644 --- a/jcc.c +++ b/jcc.c @@ -376,7 +376,8 @@ static void sig_handler(int the_signal) * We shouldn't be here, unless we catch signals * in main() that we can't handle here! */ - log_error(LOG_LEVEL_FATAL, "sig_handler: exiting on unexpected signal %d", the_signal); + log_error(LOG_LEVEL_FATAL, + "sig_handler: exiting on unexpected signal %d", the_signal); } return; @@ -1860,7 +1861,7 @@ static jb_err receive_client_request(struct client_state *csp) * elsewhere failed or Privoxy is configured * to only accept proxy requests. * - * An error response has already been send + * An error response has already been sent * and we're done here. */ return JB_ERR_PARSE; @@ -6182,11 +6183,6 @@ static void listen_loop(void) /* NOTREACHED unless FEATURE_GRACEFUL_TERMINATION is defined */ -#ifdef FEATURE_HTTPS_INSPECTION - /* Clean up. Aim: free all memory (no leaks) */ - ssl_release(); -#endif - #ifdef FEATURE_GRACEFUL_TERMINATION log_error(LOG_LEVEL_INFO, "Graceful termination requested."); @@ -6219,6 +6215,17 @@ static void listen_loop(void) freez(basedir); #endif +#ifdef FEATURE_HTTPS_INSPECTION + /* + * Only release TLS backed resources if there + * are no active connections left. + */ + if (clients->next == NULL) + { + ssl_release(); + } +#endif + log_error(LOG_LEVEL_INFO, "Exiting gracefully."); #if defined(_WIN32) && !defined(_WIN_CONSOLE)