Fix: add missing rcu_barrier at end of sessiond main
[lttng-tools.git] / src / bin / lttng-sessiond / agent.c
index 89f176947ce24590ebb4075d61eecd2e219798a4..32c261ca7529dba09e20544e8fd0debbbdfe07ab 100644 (file)
@@ -927,8 +927,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)
 {
@@ -967,6 +966,7 @@ void agent_destroy(struct agent *agt)
        rcu_read_unlock();
 
        ht_cleanup_push(agt->events);
+       free(agt);
 }
 
 /*
This page took 0.025011 seconds and 4 git commands to generate.