X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fkernel.cpp;h=f7d232ffc01aadb346b5fdf6d8c4928ea5163727;hb=64803277bbdbe0a943360d918298a48157d9da55;hp=c4662af0d011a8aa43e14221e372253d139fda52;hpb=f46376a14da2eb796690cb4e718e8b213839d6ea;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/kernel.cpp b/src/bin/lttng-sessiond/kernel.cpp index c4662af0d..f7d232ffc 100644 --- a/src/bin/lttng-sessiond/kernel.cpp +++ b/src/bin/lttng-sessiond/kernel.cpp @@ -14,40 +14,40 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include -#include +#include #include -#include +#include #include -#include -#include - -#include "event-notifier-error-accounting.h" -#include "lttng-sessiond.h" -#include "lttng-syscall.h" -#include "condition-internal.h" -#include "consumer.h" -#include "kernel.h" -#include "kernel-consumer.h" -#include "kern-modules.h" -#include "sessiond-config.h" -#include "utils.h" -#include "rotate.h" -#include "modprobe.h" -#include "tracker.h" -#include "notification-thread-commands.h" +#include +#include + +#include "event-notifier-error-accounting.hpp" +#include "lttng-sessiond.hpp" +#include "lttng-syscall.hpp" +#include "condition-internal.hpp" +#include "consumer.hpp" +#include "kernel.hpp" +#include "kernel-consumer.hpp" +#include "kern-modules.hpp" +#include "sessiond-config.hpp" +#include "utils.hpp" +#include "rotate.hpp" +#include "modprobe.hpp" +#include "tracker.hpp" +#include "notification-thread-commands.hpp" /* * Key used to reference a channel between the sessiond and the consumer. This @@ -1436,7 +1436,7 @@ ssize_t kernel_list_events(struct lttng_event **events) * See kernel-ctl.h for explanation of this value */ nbmem = KERNEL_EVENT_INIT_LIST_SIZE; - elist = (lttng_event *) zmalloc(sizeof(struct lttng_event) * nbmem); + elist = calloc(nbmem); if (elist == NULL) { PERROR("alloc list events"); count = -ENOMEM;