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: I58862b3b38c7e61806e0047840bf68619273db49
if (capture_bytecode == NULL) {
ERR("Unexpected NULL capture bytecode on condition");
error_code_ret = LTTNG_ERR_KERN_ENABLE_FAIL;
- goto error;
+ goto capture_error;
}
ret = kernctl_capture(event_notifier_rule->fd, capture_bytecode);
ERR("Failed to set capture bytecode on event notifier rule fd: fd = %d",
event_notifier_rule->fd);
error_code_ret = LTTNG_ERR_KERN_ENABLE_FAIL;
- goto error;
+ goto capture_error;
}
}
return LTTNG_OK;
+capture_error:
add_callsite_error:
enable_error:
set_cloexec_error: