projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: ambiguous ownership of kernel context by multiple channels
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
kernel.c
diff --git
a/src/bin/lttng-sessiond/kernel.c
b/src/bin/lttng-sessiond/kernel.c
index e478499336896f5d739e087c8ee91e3a395886cd..fb6f96d47f4050edd28b4eb8507aa55993764800 100644
(file)
--- a/
src/bin/lttng-sessiond/kernel.c
+++ b/
src/bin/lttng-sessiond/kernel.c
@@
-36,6
+36,8
@@
/*
* Add context on a kernel channel.
/*
* Add context on a kernel channel.
+ *
+ * Assumes the ownership of ctx.
*/
int kernel_add_channel_context(struct ltt_kernel_channel *chan,
struct ltt_kernel_context *ctx)
*/
int kernel_add_channel_context(struct ltt_kernel_channel *chan,
struct ltt_kernel_context *ctx)
@@
-66,9
+68,11
@@
int kernel_add_channel_context(struct ltt_kernel_channel *chan,
end:
cds_list_add_tail(&ctx->list, &chan->ctx_list);
end:
cds_list_add_tail(&ctx->list, &chan->ctx_list);
- return 0;
-
+ ctx = NULL;
error:
error:
+ if (ctx) {
+ trace_kernel_destroy_context(ctx);
+ }
return ret;
}
return ret;
}
This page took
0.023287 seconds
and
4
git commands to generate.