X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=lttng-sessiond%2Fust-app.c;h=1afb6d199db7bbda66e52979742e93d2a33a4cb9;hp=8e7a0ce1dd5e45469659991a7f1a80442fc9bc0c;hb=ae357384bdcd4fece4f1c5ae4311d82a1345bf67;hpb=525b07400aa31a94237adda245f793188643bc29 diff --git a/lttng-sessiond/ust-app.c b/lttng-sessiond/ust-app.c index 8e7a0ce1d..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; @@ -1217,7 +1217,6 @@ error: void ust_app_clean_list(void) { int ret; - struct cds_lfht_node *node; struct cds_lfht_iter iter; struct ust_app *app; @@ -1228,7 +1227,7 @@ void ust_app_clean_list(void) cds_lfht_for_each_entry(ust_app_ht, &iter, app, node) { ret = hashtable_del(ust_app_ht, &iter); assert(!ret); - call_rcu(&node->head, delete_ust_app_rcu); + call_rcu(&iter.node->head, delete_ust_app_rcu); } hashtable_destroy(ust_app_ht);