mirror of
https://github.com/zeek/zeek.git
synced 2025-10-17 05:58:20 +00:00
rule-parse: Remove id_to_str() lookup to squelch coverity warning
Coverity didn't like that id_to_str() allocates memory and we didn't free it. Remote its usage wholesale.
This commit is contained in:
parent
371dcdc94e
commit
fa9dc159a2
3 changed files with 14 additions and 7 deletions
|
@ -196,12 +196,7 @@ rule_attr:
|
|||
if ( is_event($2) )
|
||||
current_rule->AddAction(new zeek::detail::RuleActionEvent(nullptr, $2));
|
||||
else
|
||||
{
|
||||
const char *msg = id_to_str($2);
|
||||
if ( ! zeek::util::streq(msg, "<error>") )
|
||||
zeek::reporter->Error("Identifier %s is not an event (%s:%d)", id_to_str($2),
|
||||
current_rule_file, rules_line_number+1);
|
||||
}
|
||||
rules_error("identifier is not an event", $2);
|
||||
}
|
||||
|
||||
| TOK_EVENT TOK_IDENT TOK_STRING
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue