mirror of
https://github.com/falcosecurity/falco.git
synced 2025-09-03 23:55:06 +00:00
Prevent rule_result from leaking on error.
Change falco_engine::process_event to return a unique_ptr that wraps the rule result, so it won't be leaked if this method throws an exception. This means that callers don't need to create their own.
This commit is contained in:
@@ -63,7 +63,7 @@ public:
|
||||
// the rule that matched. If no rule matched, returns NULL.
|
||||
//
|
||||
// the reutrned rule_result is allocated and must be delete()d.
|
||||
rule_result *process_event(sinsp_evt *ev);
|
||||
std::unique_ptr<rule_result> process_event(sinsp_evt *ev);
|
||||
|
||||
//
|
||||
// Print details on the given rule. If rule is NULL, print
|
||||
|
Reference in New Issue
Block a user