X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fnotification-thread.c;h=0c2d0d294628e2aea442498592ec1f379b15727a;hp=ba308bc831d7e26802f6995ae4fa433f89e1ced1;hb=242388e491e4219f967ee424d7bf02035a313e6f;hpb=28b3dc1e1eca004cae6023b8e491835ecdfdd041;ds=sidebyside diff --git a/src/bin/lttng-sessiond/notification-thread.c b/src/bin/lttng-sessiond/notification-thread.c index ba308bc83..0c2d0d294 100644 --- a/src/bin/lttng-sessiond/notification-thread.c +++ b/src/bin/lttng-sessiond/notification-thread.c @@ -362,6 +362,10 @@ void fini_thread_state(struct notification_thread_state *state) ret = cds_lfht_destroy(state->sessions_ht, NULL); assert(!ret); } + if (state->triggers_by_name_uid_ht) { + ret = cds_lfht_destroy(state->triggers_by_name_uid_ht, NULL); + assert(!ret); + } /* * Must be destroyed after all channels have been destroyed. * See comment in struct lttng_session_trigger_list. @@ -475,6 +479,11 @@ int init_thread_state(struct notification_thread_handle *handle, if (!state->triggers_ht) { goto error; } + state->triggers_by_name_uid_ht = cds_lfht_new(DEFAULT_HT_SIZE, + 1, 0, CDS_LFHT_AUTO_RESIZE | CDS_LFHT_ACCOUNTING, NULL); + if (!state->triggers_by_name_uid_ht) { + goto error; + } state->executor = action_executor_create(handle); if (!state->executor) {