#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
kfree(field->event_field.name);
kfree(field->u.perf_counter->attr);
- kfree(events);
+ lttng_kvfree(events);
kfree(field->u.perf_counter);
}
int ret;
char *name_alloc;
- events = kzalloc(num_possible_cpus() * sizeof(*events), GFP_KERNEL);
+ events = lttng_kvzalloc(num_possible_cpus() * sizeof(*events), GFP_KERNEL);
if (!events)
return -ENOMEM;
error_alloc_perf_field:
kfree(attr);
error_attr:
- kfree(events);
+ lttng_kvfree(events);
return ret;
}