X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lttng-context-ppid.c;h=738f7e6882d518d95b2ebe559ede4e683363bbf9;hb=44252f0fd51fd4bf28926dcef525355bceb08c5f;hp=9f647ab1a079eac1066057cebefea2205a7b8ee7;hpb=96ba7208aa8009345a525148e32f78cd8d4693ab;p=lttng-modules.git diff --git a/lttng-context-ppid.c b/lttng-context-ppid.c index 9f647ab1..738f7e68 100644 --- a/lttng-context-ppid.c +++ b/lttng-context-ppid.c @@ -47,6 +47,10 @@ int lttng_add_ppid_to_ctx(struct lttng_ctx **ctx) field = lttng_append_context(ctx); if (!field) return -ENOMEM; + if (lttng_find_context(*ctx, "ppid")) { + lttng_remove_context_field(ctx, field); + return -EEXIST; + } field->event_field.name = "ppid"; field->event_field.type.atype = atype_integer; field->event_field.type.u.basic.integer.size = sizeof(pid_t) * CHAR_BIT;