Minor fixes
This commit is contained in:
@@ -467,11 +467,12 @@ ndpi_classify (const unsigned short *pkt_len, const struct timeval *pkt_time,
|
||||
features[i] = 0.0;
|
||||
}
|
||||
|
||||
merged_lens = calloc(1, sizeof(uint16_t)*(op_n + ip_n));
|
||||
merged_times = calloc(1, sizeof(uint16_t)*(op_n + ip_n));
|
||||
merged_lens = ndpi_calloc(1, sizeof(uint16_t)*(op_n + ip_n));
|
||||
merged_times = ndpi_calloc(1, sizeof(uint16_t)*(op_n + ip_n));
|
||||
|
||||
if(!merged_lens || !merged_times) {
|
||||
free(merged_lens);
|
||||
free(merged_times);
|
||||
ndpi_free(merged_lens);
|
||||
ndpi_free(merged_times);
|
||||
return(score);
|
||||
}
|
||||
|
||||
@@ -529,8 +530,8 @@ ndpi_classify (const unsigned short *pkt_len, const struct timeval *pkt_time,
|
||||
|
||||
score = min(-score,500.0); // check b/c overflow
|
||||
|
||||
free(merged_lens);
|
||||
free(merged_times);
|
||||
ndpi_free(merged_lens);
|
||||
ndpi_free(merged_times);
|
||||
|
||||
return 1.0/(1.0+exp(score));
|
||||
}
|
||||
|
||||
@@ -322,7 +322,7 @@ void ndpi_search_kerberos(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
|
||||
/* We set the protocol in the response */
|
||||
if(flow->kerberos_buf.pktbuf != NULL) {
|
||||
free(flow->kerberos_buf.pktbuf);
|
||||
ndpi_free(flow->kerberos_buf.pktbuf);
|
||||
flow->kerberos_buf.pktbuf = NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -341,7 +341,7 @@ static void ndpi_search_ssh_tcp(struct ndpi_detection_module_struct *ndpi_struct
|
||||
flow->protos.ssh.hassh_server[32] = '\0';
|
||||
}
|
||||
|
||||
free(hassh_buf);
|
||||
ndpi_free(hassh_buf);
|
||||
}
|
||||
|
||||
ndpi_int_ssh_add_connection(ndpi_struct, flow);
|
||||
|
||||
Reference in New Issue
Block a user