Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
free(o->object);
if (o->value)
free(o->value);
+ free(o);
}
static int collecty_daemon_setup_queue(collecty_daemon* self) {
}
static void collecty_daemon_free(collecty_daemon* self) {
+ struct collecty_queue_object* o = NULL;
+
+ // Cleanup the queue
+ for (;;) {
+ o = STAILQ_FIRST(&self->queue);
+ if (!o)
+ break;
+
+ // Remove the object from the queue
+ STAILQ_REMOVE_HEAD(&self->queue, nodes);
+
+ // Free the object
+ collecty_daemon_free_queue_object(o);
+ }
+
if (self->events.modules_init)
sd_event_source_unref(self->events.modules_init);
if (self->events.sigterm)