X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fnotification-thread.c;h=62d47ee54182cfc3da2a27d3dbf4ba37638a67f4;hp=92ac597fa00a58e7720f6710579df372c22cd6a6;hb=8abe313a6c4f251063e4b72ddd47ce8107384d71;hpb=18d0885089aafd5665cea5fcff8a7a467b6ff37d diff --git a/src/bin/lttng-sessiond/notification-thread.c b/src/bin/lttng-sessiond/notification-thread.c index 92ac597fa..62d47ee54 100644 --- a/src/bin/lttng-sessiond/notification-thread.c +++ b/src/bin/lttng-sessiond/notification-thread.c @@ -350,11 +350,13 @@ void fini_thread_state(struct notification_thread_state *state) assert(!ret); } if (state->channels_ht) { - ret = cds_lfht_destroy(state->channels_ht, - NULL); + ret = cds_lfht_destroy(state->channels_ht, NULL); + assert(!ret); + } + if (state->sessions_ht) { + ret = cds_lfht_destroy(state->sessions_ht, NULL); assert(!ret); } - if (state->notification_channel_socket >= 0) { notification_channel_socket_destroy( state->notification_channel_socket); @@ -420,7 +422,11 @@ int init_thread_state(struct notification_thread_handle *handle, if (!state->channels_ht) { goto error; } - + state->sessions_ht = cds_lfht_new(DEFAULT_HT_SIZE, + 1, 0, CDS_LFHT_AUTO_RESIZE | CDS_LFHT_ACCOUNTING, NULL); + if (!state->sessions_ht) { + goto error; + } state->triggers_ht = cds_lfht_new(DEFAULT_HT_SIZE, 1, 0, CDS_LFHT_AUTO_RESIZE | CDS_LFHT_ACCOUNTING, NULL); if (!state->triggers_ht) {