mirror of
https://github.com/vel21ripn/nDPI.git
synced 2026-05-20 09:23:49 +00:00
Fix memory leak in ndpiReader.
Changes in library for strict function prototype. Signed-off-by: Ravi Kerur <ravi.kerur@viasat.com>
This commit is contained in:
parent
604abaf81c
commit
7cb3cb7353
3 changed files with 3 additions and 3 deletions
|
|
@ -185,7 +185,7 @@ void ndpi_payload_analyzer(struct ndpi_flow_info *flow,
|
|||
u_int16_t i, j;
|
||||
u_int16_t scan_len = ndpi_min(max_packet_payload_dissection, payload_len);
|
||||
|
||||
if((flow->entropy.src2dst_pkt_count+flow->entropy.dst2src_pkt_count) <= max_num_packets_per_flow) {
|
||||
if((flow->src2dst_packets+flow->dst2src_packets) <= max_num_packets_per_flow) {
|
||||
#ifdef DEBUG_PAYLOAD
|
||||
printf("[hashval: %u][proto: %u][vlan: %u][%s:%u <-> %s:%u][direction: %s][payload_len: %u]\n",
|
||||
flow->hashval, flow->protocol, flow->vlan_id,
|
||||
|
|
|
|||
|
|
@ -848,7 +848,7 @@ extern "C" {
|
|||
ndpi_serializer *serializer);
|
||||
|
||||
/* ptree (trie) API */
|
||||
ndpi_ptree_t* ndpi_ptree_create();
|
||||
ndpi_ptree_t* ndpi_ptree_create(void);
|
||||
int ndpi_ptree_insert(ndpi_ptree_t *tree, const ndpi_ip_addr_t *addr, u_int8_t bits, uint user_data);
|
||||
int ndpi_ptree_match_addr(ndpi_ptree_t *tree, const ndpi_ip_addr_t *addr, uint *user_data);
|
||||
void ndpi_ptree_destroy(ndpi_ptree_t *tree);
|
||||
|
|
|
|||
|
|
@ -6546,7 +6546,7 @@ ndpi_l4_proto_info ndpi_get_l4_proto_info(struct ndpi_detection_module_struct *n
|
|||
|
||||
/* ******************************************************************** */
|
||||
|
||||
ndpi_ptree_t* ndpi_ptree_create() {
|
||||
ndpi_ptree_t* ndpi_ptree_create(void) {
|
||||
ndpi_ptree_t *tree = (ndpi_ptree_t*) ndpi_malloc(sizeof(ndpi_ptree_t));
|
||||
|
||||
if(tree) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue