log-filestore: fix file descriptor leak

In the case we exceed the number of simultaneously open
file we can reach a state were we will not close the file
after writing.

Thanks to Steve Grubb <sgrubb@redhat.com> for the analysis.
pull/3466/head
Eric Leblond 7 years ago committed by Victor Julien
parent 876156d3a1
commit 7e8a749227

@ -461,6 +461,7 @@ static int LogFilestoreLogger(ThreadVars *tv, void *thread_data, const Packet *p
if (FileGetMaxOpenFiles() > 0) {
StatsIncr(tv, aft->counter_max_hits);
}
ff->fd = -1;
}
/* we can get called with a NULL ffd when we need to close */
} else if (data != NULL) {

Loading…
Cancel
Save