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 b32193451f2060c401ac9d7503f2e48574be3fe4..2031bfb38f4ca3825f37067a2ddbca50890e54f8 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)
@@
-63,12
+65,15
@@
int kernel_add_channel_context(struct ltt_kernel_channel *chan,
goto error;
}
}
goto error;
}
}
+ ret = 0;
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.024677 seconds
and
4
git commands to generate.