diff options
Diffstat (limited to 'src/machine/machined.c')
-rw-r--r-- | src/machine/machined.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/machine/machined.c b/src/machine/machined.c index c5c20abf0c..6877c2b313 100644 --- a/src/machine/machined.c +++ b/src/machine/machined.c @@ -34,6 +34,7 @@ #include "bus-util.h" #include "bus-error.h" #include "label.h" +#include "machine-image.h" #include "machined.h" Manager *manager_new(void) { @@ -66,6 +67,7 @@ Manager *manager_new(void) { void manager_free(Manager *m) { Machine *machine; + Image *i; assert(m); @@ -76,6 +78,13 @@ void manager_free(Manager *m) { hashmap_free(m->machine_units); hashmap_free(m->machine_leaders); + while ((i = hashmap_steal_first(m->image_cache))) + image_unref(i); + + hashmap_free(m->image_cache); + + sd_event_source_unref(m->image_cache_defer_event); + bus_verify_polkit_async_registry_free(m->polkit_registry); sd_bus_unref(m->bus); |