Coverity reports:
1445768 Resource leak
The system resource will not be reclaimed and reused, reducing the future availability of the resource.
In kernel_create_event_notifier_rule: Leak of memory or pointers to system resources (CWE-404)
Reported-by: Coverity Scan
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Ica3f414fb7640ecddf9affbcc359121b04a82277
error_code_ret = trace_kernel_init_event_notifier_from_event_rule(
event_rule, &kernel_event_notifier);
if (error_code_ret != LTTNG_OK) {
- goto error;
+ goto free_event;
}
kernel_event_notifier.event.token = event_notifier_rule->token;