X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=lttng-sessiond%2Fust-app.c;h=1afb6d199db7bbda66e52979742e93d2a33a4cb9;hp=0472251434dbb8fb1953ceda2777ce7a46412adb;hb=2f2215907a630529cfa2f85d3d143c889e4fc021;hpb=0d5d001d7df80ba9e8c9026b48b8995ca15c38dd diff --git a/lttng-sessiond/ust-app.c b/lttng-sessiond/ust-app.c index 047225143..1afb6d199 100644 --- a/lttng-sessiond/ust-app.c +++ b/lttng-sessiond/ust-app.c @@ -1185,7 +1185,7 @@ int ust_app_list_events(struct lttng_event **events) DBG2("Reallocating event list from %zu to %zu bytes", nbmem, nbmem + UST_APP_EVENT_LIST_SIZE); nbmem += UST_APP_EVENT_LIST_SIZE; - tmp = realloc(tmp, nbmem); + tmp = realloc(tmp, nbmem * sizeof(struct lttng_event)); if (tmp == NULL) { PERROR("realloc ust app events"); ret = -ENOMEM;