From 4c7c514aab9e3a6ade7ced2015f54e89d2e84b1b Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Fri, 3 Jun 2011 16:18:44 -0400 Subject: [PATCH] Fix perf counter test bug Signed-off-by: Mathieu Desnoyers --- lttng-context-perf-counters.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lttng-context-perf-counters.c b/lttng-context-perf-counters.c index e9a57888..ede510ec 100644 --- a/lttng-context-perf-counters.c +++ b/lttng-context-perf-counters.c @@ -112,7 +112,7 @@ int lttng_add_perf_counter_to_ctx(uint32_t type, } name_alloc = kstrdup(name, GFP_KERNEL); - if (!field->event_field.name) + if (!name_alloc) goto name_alloc_error; field = lttng_append_context(ctx); -- 2.34.1