- session_notify_destruction(session);
- lttng_dynamic_array_reset(&session->destroy_notifiers);
- if (session->current_trace_chunk) {
- ret = session_close_trace_chunk(session, session->current_trace_chunk);
- if (ret) {
- ERR("Failed to close the current trace chunk of session \"%s\" during its release",
- session->name);
- }
- ret = _session_set_trace_chunk_no_lock_check(session, NULL, NULL);
- if (ret) {
- ERR("Failed to release the current trace chunk of session \"%s\" during its release",
- session->name);
- }
- }
-
- /* Clean kernel session teardown */