fixed some allocations in the ssl-part before lighty exits to make valgrind happy

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1372 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.13
Jan Kneschke 2006-10-04 13:31:49 +00:00
parent 8cd1471cb3
commit 1398cb2e3e
1 changed files with 17 additions and 1 deletions

View File

@ -55,6 +55,10 @@
#include <sys/prctl.h>
#endif
#ifdef USE_OPENSSL
# include <openssl/err.h>
#endif
#ifndef __sgi
/* IRIX doesn't like the alarm based time() optimization */
/* #define USE_ALARM */
@ -239,10 +243,13 @@ static void server_free(server *srv) {
buffer_free(s->server_tag);
buffer_free(s->ssl_pemfile);
buffer_free(s->ssl_ca_file);
buffer_free(s->ssl_cipher_list);
buffer_free(s->error_handler);
buffer_free(s->errorfile_prefix);
array_free(s->mimetypes);
#ifdef USE_OPENSSL
SSL_CTX_free(s->ssl_ctx);
#endif
free(s);
}
free(srv->config_storage);
@ -268,6 +275,15 @@ static void server_free(server *srv) {
array_free(srv->srvconf.modules);
array_free(srv->split_vals);
#ifdef USE_OPENSSL
if (srv->ssl_is_init) {
CRYPTO_cleanup_all_ex_data();
ERR_free_strings();
ERR_remove_state(0);
EVP_cleanup();
}
#endif
free(srv);
}