agent_destroy() has a comment which indicates that it does _not_
destroy the pointer passed to it and it seems that agents are
never realeased under any code path whatsoever.
There does not seem to be an instance where an agent is allocated on
the stack.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
}
/*
- * 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)
{
rcu_read_unlock();
ht_cleanup_push(agt->events);
+ free(agt);
}
/*