Tests: kernel wildcards
[lttng-tools.git] / src / bin / lttng-sessiond / agent.c
index c438191658b848a98ea8ff6172b7a6b3c873b36a..b7d41f2f406ad948012666e45cde4872e93bc3ee 100644 (file)
@@ -163,7 +163,7 @@ static void destroy_event_agent_rcu(struct rcu_head *head)
        struct agent_event *event =
                caa_container_of(node, struct agent_event, node);
 
-       free(event);
+       agent_destroy_event(event);
 }
 
 /*
@@ -960,8 +960,7 @@ void agent_destroy_event(struct agent_event *event)
 }
 
 /*
- * Destroy an agent completely. Note that the given pointer is NOT freed
- * thus a reference to static or stack data can be passed to this function.
+ * Destroy an agent completely.
  */
 void agent_destroy(struct agent *agt)
 {
@@ -992,6 +991,7 @@ void agent_destroy(struct agent *agt)
        rcu_read_unlock();
 
        ht_cleanup_push(agt->events);
+       free(agt);
 }
 
 /*
This page took 0.026095 seconds and 5 git commands to generate.