X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lttng-context-perf-counters.c;fp=lttng-context-perf-counters.c;h=20d49d580760b8c4ed8cd15ce239bb6c2d77b17b;hb=bef96e480c8b83dc90b22803b865ad2a40bdcb67;hp=ede510ecc16c726dfe76688518a1c57aa1fe816e;hpb=4c7c514aab9e3a6ade7ced2015f54e89d2e84b1b;p=lttng-modules.git diff --git a/lttng-context-perf-counters.c b/lttng-context-perf-counters.c index ede510ec..20d49d58 100644 --- a/lttng-context-perf-counters.c +++ b/lttng-context-perf-counters.c @@ -107,13 +107,15 @@ int lttng_add_perf_counter_to_ctx(uint32_t type, cpu, NULL, overflow_callback); if (!events[cpu]) { ret = -EINVAL; - goto error; + goto name_alloc_error; } } name_alloc = kstrdup(name, GFP_KERNEL); - if (!name_alloc) + if (!name_alloc) { + ret = -ENOMEM; goto name_alloc_error; + } field = lttng_append_context(ctx); if (!field) {