X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lttng-context-comm.c;h=beea83ffc14e471769a7c34da63591adb2a63fd4;hb=44252f0fd51fd4bf28926dcef525355bceb08c5f;hp=ede3f51a0d4bd9ffd9568d75a28e1fc4ebc75668;hpb=96ba7208aa8009345a525148e32f78cd8d4693ab;p=lttng-modules.git diff --git a/lttng-context-comm.c b/lttng-context-comm.c index ede3f51a..beea83ff 100644 --- a/lttng-context-comm.c +++ b/lttng-context-comm.c @@ -45,6 +45,10 @@ int lttng_add_comm_to_ctx(struct lttng_ctx **ctx) field = lttng_append_context(ctx); if (!field) return -ENOMEM; + if (lttng_find_context(*ctx, "comm")) { + lttng_remove_context_field(ctx, field); + return -EEXIST; + } field->event_field.name = "comm"; field->event_field.type.atype = atype_array; field->event_field.type.u.array.elem_type.atype = atype_integer;