struct list_head *instance_bytecode_runtime_head,
struct list_head *enabler_bytecode_runtime_head);
void lttng_free_event_filter_runtime(struct lttng_event *event);
+void lttng_free_event_notifier_filter_runtime(struct lttng_event_notifier *event_notifier);
int lttng_probes_init(void);
kfree(runtime);
}
}
+
+void lttng_free_event_notifier_filter_runtime(struct lttng_event_notifier *event_notifier)
+{
+ struct bytecode_runtime *runtime, *tmp;
+
+ list_for_each_entry_safe(runtime, tmp,
+ &event_notifier->filter_bytecode_runtime_head, p.node) {
+ kfree(runtime->data);
+ kfree(runtime);
+ }
+}
static
void _lttng_event_notifier_destroy(struct lttng_event_notifier *event_notifier)
{
+ struct lttng_enabler_ref *enabler_ref, *tmp_enabler_ref;
+
switch (event_notifier->instrumentation) {
case LTTNG_KERNEL_TRACEPOINT:
lttng_event_desc_put(event_notifier->desc);
WARN_ON_ONCE(1);
}
list_del(&event_notifier->list);
+ lttng_free_event_notifier_filter_runtime(event_notifier);
+ /* Free event enabler refs */
+ list_for_each_entry_safe(enabler_ref, tmp_enabler_ref,
+ &event_notifier->enablers_ref_head, node)
+ kfree(enabler_ref);
kmem_cache_free(event_notifier_cache, event_notifier);
}