X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fagent.c;h=c0b8a218b5acb0ef3cc33d53e2df2a805b01d7fc;hb=b318c0ee9896652084d437b6c1584d7f2e49c911;hp=29541ac23c57a4979470367f3fe464ef0cf7ef5e;hpb=8a1032bc9f128cbac0de587ae5ea3c536b56d54b;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/agent.c b/src/bin/lttng-sessiond/agent.c index 29541ac23..c0b8a218b 100644 --- a/src/bin/lttng-sessiond/agent.c +++ b/src/bin/lttng-sessiond/agent.c @@ -124,7 +124,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); } /* @@ -919,8 +919,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) { @@ -959,6 +958,7 @@ void agent_destroy(struct agent *agt) rcu_read_unlock(); ht_cleanup_push(agt->events); + free(agt); } /*