X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fkernel.cpp;fp=src%2Fbin%2Flttng-sessiond%2Fkernel.cpp;h=f7d232ffc01aadb346b5fdf6d8c4928ea5163727;hp=9d256e2075373c7dbb1de925a2f759129e6742bd;hb=64803277bbdbe0a943360d918298a48157d9da55;hpb=60f1b42d6280b6bd386abb726dca4fd3b31d8491 diff --git a/src/bin/lttng-sessiond/kernel.cpp b/src/bin/lttng-sessiond/kernel.cpp index 9d256e207..f7d232ffc 100644 --- a/src/bin/lttng-sessiond/kernel.cpp +++ b/src/bin/lttng-sessiond/kernel.cpp @@ -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;