]> git.ipfire.org Git - thirdparty/suricata.git/commit
file: fix files not getting pruned 3247/head
authorVictor Julien <victor@inliniac.net>
Tue, 13 Feb 2018 12:42:39 +0000 (13:42 +0100)
committerVictor Julien <victor@inliniac.net>
Wed, 14 Feb 2018 14:38:30 +0000 (15:38 +0100)
commitffc847db01fbf81df8a647d7a794d99894e4939d
treedf619164d4a10cef62d9b6909c8e3e7a8776f68a
parent9423f6149f5aa673e4313ec0281033c02cc09c63
file: fix files not getting pruned

When the filedata logger is enabled (file extraction), but a file is not
stored due to no rules matching to force this, the file would never be
freed.

This was caused by a check in the file pruning logic that only freed a
file when the FILE_STORED flag was set. However files can also have the
FILE_NOSTORE flag set which indicates that a file won't be stored.

This patch makes sure that both conditions lead to file pruning.
src/util-file.c