mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 01:58:20 +00:00
Close signature files after done parsing.
This commit is contained in:
parent
d3e908af3b
commit
92d2fdd4a6
1 changed files with 2 additions and 0 deletions
|
@ -227,6 +227,7 @@ bool RuleMatcher::ReadFiles(const name_list& files)
|
||||||
for ( int i = 0; i < files.length(); ++i )
|
for ( int i = 0; i < files.length(); ++i )
|
||||||
{
|
{
|
||||||
rules_in = open_file(find_file(files[i], bro_path(), "sig"));
|
rules_in = open_file(find_file(files[i], bro_path(), "sig"));
|
||||||
|
|
||||||
if ( ! rules_in )
|
if ( ! rules_in )
|
||||||
{
|
{
|
||||||
reporter->Error("Can't open signature file %s", files[i]);
|
reporter->Error("Can't open signature file %s", files[i]);
|
||||||
|
@ -236,6 +237,7 @@ bool RuleMatcher::ReadFiles(const name_list& files)
|
||||||
rules_line_number = 0;
|
rules_line_number = 0;
|
||||||
current_rule_file = files[i];
|
current_rule_file = files[i];
|
||||||
rules_parse();
|
rules_parse();
|
||||||
|
fclose(rules_in);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( parse_error )
|
if ( parse_error )
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue