mirror of
https://github.com/lxsang/ant-http
synced 2024-12-26 16:58:22 +01:00
open ssl still leak memory
This commit is contained in:
parent
d91370548d
commit
a3509ca6aa
@ -203,6 +203,7 @@ void *accept_request(void *data)
|
|||||||
return task;
|
return task;
|
||||||
default:
|
default:
|
||||||
LOG("Error performing SSL handshake %d %d %lu\n", stat, ret, ERR_get_error());
|
LOG("Error performing SSL handshake %d %d %lu\n", stat, ret, ERR_get_error());
|
||||||
|
server_config.connection++;
|
||||||
ERR_print_errors_fp(stderr);
|
ERR_print_errors_fp(stderr);
|
||||||
return task;
|
return task;
|
||||||
}
|
}
|
||||||
@ -339,7 +340,7 @@ void *resolve_request(void *data)
|
|||||||
if (h)
|
if (h)
|
||||||
{
|
{
|
||||||
//sprintf(path,"/%s%s",h,url);
|
//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)
|
//if(execute_plugin(client,buf,method,rq) < 0)
|
||||||
// cannot_execute(client);
|
// cannot_execute(client);
|
||||||
free(task);
|
free(task);
|
||||||
@ -941,7 +942,7 @@ void *decode_multi_part_request_data(void *data)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOG("Cannot wirte file to :%s\n", file_path);
|
LOG("Cannot write file to :%s\n", file_path);
|
||||||
}
|
}
|
||||||
free(file_path);
|
free(file_path);
|
||||||
free(part_file);
|
free(part_file);
|
||||||
|
8
httpd.c
8
httpd.c
@ -85,7 +85,15 @@ void stop_serve(int dummy) {
|
|||||||
unload_all_plugin();
|
unload_all_plugin();
|
||||||
destroy_config();
|
destroy_config();
|
||||||
#ifdef USE_OPENSSL
|
#ifdef USE_OPENSSL
|
||||||
|
FIPS_mode_set(0);
|
||||||
SSL_CTX_free(ctx);
|
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
|
#endif
|
||||||
close(server_sock);
|
close(server_sock);
|
||||||
sigprocmask(SIG_UNBLOCK, &mask, NULL);
|
sigprocmask(SIG_UNBLOCK, &mask, NULL);
|
||||||
|
@ -234,6 +234,13 @@ int antd_close(void* src)
|
|||||||
SSL_set_shutdown((SSL*) source->ssl, SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN);
|
SSL_set_shutdown((SSL*) source->ssl, SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN);
|
||||||
//printf("SSL:Free ssl\n");
|
//printf("SSL:Free ssl\n");
|
||||||
SSL_free((SSL*) source->ssl);
|
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");
|
//LOG("Freeing SSL\n");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user