1
0
mirror of https://github.com/lxsang/ant-http synced 2024-07-01 12:59:47 +02:00

open ssl still leak memory

This commit is contained in:
lxsang 2018-10-09 12:15:48 +02:00
parent d91370548d
commit a3509ca6aa
3 changed files with 18 additions and 2 deletions

View File

@ -203,6 +203,7 @@ void *accept_request(void *data)
return task;
default:
LOG("Error performing SSL handshake %d %d %lu\n", stat, ret, ERR_get_error());
server_config.connection++;
ERR_print_errors_fp(stderr);
return task;
}
@ -339,7 +340,7 @@ void *resolve_request(void *data)
if (h)
{
//sprintf(path,"/%s%s",h,url);
LOG("WARNING::::Access octetstream via handler %s\n", h);
LOG("WARNING::::Access octetstream via handle %s\n", h);
//if(execute_plugin(client,buf,method,rq) < 0)
// cannot_execute(client);
free(task);
@ -941,7 +942,7 @@ void *decode_multi_part_request_data(void *data)
}
else
{
LOG("Cannot wirte file to :%s\n", file_path);
LOG("Cannot write file to :%s\n", file_path);
}
free(file_path);
free(part_file);

View File

@ -85,7 +85,15 @@ void stop_serve(int dummy) {
unload_all_plugin();
destroy_config();
#ifdef USE_OPENSSL
FIPS_mode_set(0);
SSL_CTX_free(ctx);
FIPS_mode_set(0);
CONF_modules_unload(1);
EVP_cleanup();
ENGINE_cleanup();
CRYPTO_cleanup_all_ex_data();
ERR_remove_state(0);
ERR_free_strings();
#endif
close(server_sock);
sigprocmask(SIG_UNBLOCK, &mask, NULL);

View File

@ -234,6 +234,13 @@ int antd_close(void* src)
SSL_set_shutdown((SSL*) source->ssl, SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN);
//printf("SSL:Free ssl\n");
SSL_free((SSL*) source->ssl);
//EVP_cleanup();
//ENGINE_cleanup();
CRYPTO_cleanup_all_ex_data();
ERR_remove_state(0);
ERR_free_strings();
source->ssl = NULL;
//LOG("Freeing SSL\n");
}
#endif