X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fagent.c;h=32c261ca7529dba09e20544e8fd0debbbdfe07ab;hb=288bdb302a18194fe80e24af297e819575467059;hp=4342c94db96adc2955c1070d92cf8d6e81592dd6;hpb=0a3fca4d597b02143affd90d50aa33409709024a;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/agent.c b/src/bin/lttng-sessiond/agent.c index 4342c94db..32c261ca7 100644 --- a/src/bin/lttng-sessiond/agent.c +++ b/src/bin/lttng-sessiond/agent.c @@ -125,7 +125,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); } /* @@ -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); } /*