Little enhancements
This commit is contained in:
+6
-2
@@ -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.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.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->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;
|
backup = flow->num_processed_pkts;
|
||||||
backup1 = flow->guessed_protocol_id;
|
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) {
|
void ndpi_free_flow(struct ndpi_flow_struct *flow) {
|
||||||
if(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.content_type) ndpi_free(flow->http.content_type);
|
||||||
if(flow->http.user_agent) ndpi_free(flow->http.user_agent);
|
if(flow->http.user_agent) ndpi_free(flow->http.user_agent);
|
||||||
if(flow->kerberos_buf.pktbuf) ndpi_free(flow->kerberos_buf.pktbuf);
|
if(flow->kerberos_buf.pktbuf) ndpi_free(flow->kerberos_buf.pktbuf);
|
||||||
|
|||||||
@@ -590,10 +590,6 @@ static int ndpi_search_tls_tcp(struct ndpi_detection_module_struct *ndpi_struct,
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG_TLS_MEMORY
|
|
||||||
printf("[TLS Mem] Returning %u\n", rc);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if(something_went_wrong) {
|
if(something_went_wrong) {
|
||||||
flow->check_extra_packets = 0, flow->extra_packets_func = NULL;
|
flow->check_extra_packets = 0, flow->extra_packets_func = NULL;
|
||||||
return(0); /* That's all */
|
return(0); /* That's all */
|
||||||
|
|||||||
Reference in New Issue
Block a user