Fix: perf counters context: error handling on type allocation
[lttng-ust.git] / liblttng-ust / lttng-context-perf-counters.c
index 725f4cf1c90f379e990588137d2abc046252fe0a..f8241c392872ff53230c55b7201589794a8c323b 100644 (file)
@@ -19,7 +19,7 @@
 #include <sys/syscall.h>
 #include <lttng/ust-events.h>
 #include <lttng/ust-tracer.h>
-#include <lttng/ringbuffer-config.h>
+#include <lttng/ringbuffer-context.h>
 #include <urcu/system.h>
 #include <urcu/arch.h>
 #include <urcu/rculist.h>
@@ -548,7 +548,7 @@ int lttng_add_perf_counter_to_ctx(uint32_t type,
                        lttng_alignof(uint64_t) * CHAR_BIT,
                        lttng_is_signed_type(uint64_t),
                        BYTE_ORDER, 10);
-       if (!type) {
+       if (!ust_type) {
                ret = -ENOMEM;
                goto type_alloc_error;
        }
This page took 0.024685 seconds and 4 git commands to generate.