Both Coverity and scan-build got confused by this
function. Essentially, they warn that aevent can be leaked if
it is created in an already enabled state. We know that this can't
happen as the events are created in a disabled state.
Add an assert that created events are not enabled to help the static
analyzers. This could also catch the leak should this change in the
future.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
filter = NULL;
filter_expression = NULL;
created = 1;
+ assert(!aevent->enabled);
}
if (created && aevent->filter) {