struct agent_event *event =
caa_container_of(node, struct agent_event, node);
- free(event);
+ agent_destroy_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)
{
rcu_read_unlock();
ht_cleanup_push(agt->events);
+ free(agt);
}
/*