Fix: sessiond: bad fd used while rotating exiting app's buffers
[lttng-tools.git] / src / bin / lttng-sessiond / session.c
index 519c22ab5a0d767007fa7fe7026d74243daa2aa7..39edbdf6945d637aa6413b6825377618e262bf9d 100644 (file)
@@ -391,7 +391,7 @@ static bool ltt_sessions_ht_empty(void)
 
        assert(ltt_sessions_ht_by_name);
 
-       if (lttng_ht_get_count(ltt_sessions_ht_by_id) == 0) {
+       if (lttng_ht_get_count(ltt_sessions_ht_by_id) != 0) {
                /* Not empty.*/
                goto end;
        }
@@ -1032,6 +1032,7 @@ void session_release(struct urcu_ref *ref)
        lttng_dynamic_array_reset(&session->clear_notifiers);
        free(session->last_archived_chunk_name);
        free(session->base_path);
+       lttng_trigger_put(session->rotate_trigger);
        free(session);
        if (session_published) {
                /*
@@ -1415,6 +1416,7 @@ int session_reset_rotation_state(struct ltt_session *session,
                 */
                session_notify_clear(session);
        }
+
        return ret;
 }
 
This page took 0.024711 seconds and 4 git commands to generate.