X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=lttng-sessiond%2Fkernel.c;h=16334a83b26122b4096ddf9dc71c473095549867;hp=c734e889bb9cd25e808d8d5cd83d39b73f367395;hb=2f2215907a630529cfa2f85d3d143c889e4fc021;hpb=7e60e3edd26d83b98b2192cd7478c2d99e30f333 diff --git a/lttng-sessiond/kernel.c b/lttng-sessiond/kernel.c index c734e889b..16334a83b 100644 --- a/lttng-sessiond/kernel.c +++ b/lttng-sessiond/kernel.c @@ -582,7 +582,7 @@ ssize_t kernel_list_events(int tracer_fd, struct lttng_event **events) nbmem + KERNEL_EVENT_LIST_SIZE); /* Adding the default size again */ nbmem += KERNEL_EVENT_LIST_SIZE; - elist = realloc(elist, nbmem); + elist = realloc(elist, nbmem * sizeof(struct lttng_event)); if (elist == NULL) { perror("realloc list events"); count = -ENOMEM;