X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=lttng-sessiond%2Fkernel.c;h=16334a83b26122b4096ddf9dc71c473095549867;hb=7885e399f12affe1933fcacce7f2dab311ed6761;hp=c734e889bb9cd25e808d8d5cd83d39b73f367395;hpb=e0b03593613331103ad4c15a95f5495a31289225;p=lttng-tools.git 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;