added missing free for idle flow in ndpiReader.c
This commit is contained in:
@@ -1111,6 +1111,7 @@ static unsigned int packet_processing(u_int16_t thread_id,
|
|||||||
|
|
||||||
/* free the memory associated to idle flow in "idle_flows" - (see struct reader thread)*/
|
/* free the memory associated to idle flow in "idle_flows" - (see struct reader thread)*/
|
||||||
free_ndpi_flow(ndpi_thread_info[thread_id].idle_flows[ndpi_thread_info[thread_id].num_idle_flows]);
|
free_ndpi_flow(ndpi_thread_info[thread_id].idle_flows[ndpi_thread_info[thread_id].num_idle_flows]);
|
||||||
|
ndpi_free(ndpi_thread_info[thread_id].idle_flows[ndpi_thread_info[thread_id].num_idle_flows]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(++ndpi_thread_info[thread_id].idle_scan_idx == NUM_ROOTS) ndpi_thread_info[thread_id].idle_scan_idx = 0;
|
if(++ndpi_thread_info[thread_id].idle_scan_idx == NUM_ROOTS) ndpi_thread_info[thread_id].idle_scan_idx = 0;
|
||||||
@@ -1452,6 +1453,7 @@ static void printResults(u_int64_t tot_usec) {
|
|||||||
static void closePcapFile(u_int16_t thread_id) {
|
static void closePcapFile(u_int16_t thread_id) {
|
||||||
if(ndpi_thread_info[thread_id]._pcap_handle != NULL) {
|
if(ndpi_thread_info[thread_id]._pcap_handle != NULL) {
|
||||||
pcap_close(ndpi_thread_info[thread_id]._pcap_handle);
|
pcap_close(ndpi_thread_info[thread_id]._pcap_handle);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user