X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lttng-abi.c;h=f6f30430b9e89c4547d55f4c705fc233379ffe53;hb=2754583e7a52bb07e00d9c20f8f6790adb1bc503;hp=d47280f502f61c3c4a5792752443030caeb58c2b;hpb=9616f0bf9524fc6b8ad184e87f4935c97f78a8bc;p=lttng-modules.git diff --git a/lttng-abi.c b/lttng-abi.c index d47280f5..f6f30430 100644 --- a/lttng-abi.c +++ b/lttng-abi.c @@ -1676,6 +1676,7 @@ int __init lttng_abi_init(void) int ret = 0; wrapper_vmalloc_sync_all(); + lttng_clock_ref(); lttng_proc_dentry = proc_create_data("lttng", S_IRUSR | S_IWUSR, NULL, <tng_fops, NULL); @@ -1685,14 +1686,17 @@ int __init lttng_abi_init(void) goto error; } lttng_stream_override_ring_buffer_fops(); + return 0; error: + lttng_clock_unref(); return ret; } /* No __exit annotation because used by init error path too. */ void lttng_abi_exit(void) { + lttng_clock_unref(); if (lttng_proc_dentry) remove_proc_entry("lttng", NULL); }