X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=probes%2Flttng-kprobes.c;h=9dd3569b4a794d59f5a7cbec2a060fb1d3cd9a6f;hb=edeb3137b6064818f310567ded5c60e442a933e6;hp=65c1d3ba80ecf30eedbe8ccf1402c81ab4864998;hpb=4e1f08f47c1837b09af74712c299c5169496591a;p=lttng-modules.git diff --git a/probes/lttng-kprobes.c b/probes/lttng-kprobes.c index 65c1d3ba..9dd3569b 100644 --- a/probes/lttng-kprobes.c +++ b/probes/lttng-kprobes.c @@ -71,6 +71,7 @@ int lttng_create_kprobe_event(const char *name, struct ltt_event *event) field->type.u.basic.integer.reverse_byte_order = 0; field->type.u.basic.integer.base = 16; field->type.u.basic.integer.encoding = lttng_encode_none; + desc->owner = THIS_MODULE; event->desc = desc; return 0; @@ -135,12 +136,17 @@ EXPORT_SYMBOL_GPL(lttng_kprobes_register); void lttng_kprobes_unregister(struct ltt_event *event) { unregister_kprobe(&event->u.kprobe.kp); +} +EXPORT_SYMBOL_GPL(lttng_kprobes_unregister); + +void lttng_kprobes_destroy_private(struct ltt_event *event) +{ kfree(event->u.kprobe.symbol_name); kfree(event->desc->fields); kfree(event->desc->name); kfree(event->desc); } -EXPORT_SYMBOL_GPL(lttng_kprobes_unregister); +EXPORT_SYMBOL_GPL(lttng_kprobes_destroy_private); MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Mathieu Desnoyers");