Fix: don't destroy the sockets if the snapshot was successful
[lttng-tools.git] / src / bin / lttng-sessiond / agent.c
index b267503fcbcec3e58890fda360c507496645afe6..f2283991a029ce954f794cab9d8ee3251074f690 100644 (file)
@@ -769,6 +769,7 @@ struct agent *agent_create(enum lttng_domain_type domain)
        ret = agent_init(agt);
        if (ret < 0) {
                free(agt);
+               agt = NULL;
                goto error;
        }
 
@@ -909,6 +910,7 @@ void agent_destroy_event(struct agent_event *event)
 {
        assert(event);
 
+       free(event->filter);
        free(event);
 }
 
@@ -952,7 +954,7 @@ void agent_destroy(struct agent *agt)
        }
        rcu_read_unlock();
 
-       lttng_ht_destroy(agt->events);
+       ht_cleanup_push(agt->events);
 }
 
 /*
This page took 0.02546 seconds and 4 git commands to generate.