Fixes views memory leak

This commit is contained in:
MatteoBiscosi 2021-08-09 12:04:18 +02:00
parent 6b83ce7139
commit b80d3b9844
2 changed files with 12 additions and 0 deletions

View file

@ -91,6 +91,16 @@ ViewInterface::ViewInterface(const char *_endpoint) : NetworkInterface(_endpoint
/* **************************************************** */
ViewInterface::~ViewInterface() {
for(int i = 0; i < num_viewed_interfaces; i++) {
if(viewed_interfaces_queues[i])
delete viewed_interfaces_queues[i];
}
}
/* **************************************************** */
bool ViewInterface::viewEnqueue(time_t t, Flow *f, u_int8_t viewed_interface_id) {
/*
Put the element into the right single-producer (the viewed interface) single-consumer (this view interface) queue