aboutsummaryrefslogtreecommitdiff
path: root/src/lib/ndpi_main.c
diff options
context:
space:
mode:
authorLuca <deri@ntop.org>2020-02-10 15:04:37 +0100
committerLuca <deri@ntop.org>2020-02-10 15:04:37 +0100
commitaf6c86de2838a556997451ffd8e5c761b8b634f2 (patch)
tree89aeda8b4e775cbb0fa136a50985068d373357b0 /src/lib/ndpi_main.c
parent452ba1f339ae112492b75b0c53f5c2dd98ab92d2 (diff)
parent34984f1aec0eebdbee47408480c4f4cdb57cf0b3 (diff)
Merge branch 'dev' of https://github.com/ntop/nDPI into dev
Diffstat (limited to 'src/lib/ndpi_main.c')
-rw-r--r--src/lib/ndpi_main.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
index 01552a744..3b5d8e251 100644
--- a/src/lib/ndpi_main.c
+++ b/src/lib/ndpi_main.c
@@ -3846,7 +3846,11 @@ static int ndpi_init_packet_header(struct ndpi_detection_module_struct *ndpi_str
if(flow->http.url) { ndpi_free(flow->http.url); flow->http.url = NULL; }
if(flow->http.content_type) { ndpi_free(flow->http.content_type); flow->http.content_type = NULL; }
if(flow->http.user_agent) { ndpi_free(flow->http.user_agent); flow->http.user_agent = NULL; }
- if(flow->l4.tcp.tls.message.buffer) { ndpi_free(flow->l4.tcp.tls.message.buffer); flow->l4.tcp.tls.message.buffer = NULL; }
+ if(flow->l4.tcp.tls.message.buffer) {
+ ndpi_free(flow->l4.tcp.tls.message.buffer);
+ flow->l4.tcp.tls.message.buffer = NULL;
+ flow->l4.tcp.tls.message.buffer_len = flow->l4.tcp.tls.message.buffer_used = 0;
+ }
backup = flow->num_processed_pkts;
backup1 = flow->guessed_protocol_id;
@@ -6427,7 +6431,7 @@ int ndpi_match_bigram(struct ndpi_detection_module_struct *ndpi_str,
void ndpi_free_flow(struct ndpi_flow_struct *flow) {
if(flow) {
- if(flow->http.url) ndpi_free(flow->http.url);
+ if(flow->http.url) ndpi_free(flow->http.url);
if(flow->http.content_type) ndpi_free(flow->http.content_type);
if(flow->http.user_agent) ndpi_free(flow->http.user_agent);
if(flow->kerberos_buf.pktbuf) ndpi_free(flow->kerberos_buf.pktbuf);
@@ -6436,6 +6440,12 @@ void ndpi_free_flow(struct ndpi_flow_struct *flow) {
if(flow->protos.stun_ssl.ssl.server_names)
ndpi_free(flow->protos.stun_ssl.ssl.server_names);
+ if(flow->protos.stun_ssl.ssl.alpn)
+ ndpi_free(flow->protos.stun_ssl.ssl.alpn);
+
+ if(flow->protos.stun_ssl.ssl.tls_supported_versions)
+ ndpi_free(flow->protos.stun_ssl.ssl.tls_supported_versions);
+
if(flow->l4.tcp.tls.srv_cert_fingerprint_ctx)
ndpi_free(flow->l4.tcp.tls.srv_cert_fingerprint_ctx);
}