From ae90a9d2b83f3cf328d01380762506e70411cebe Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Mon, 13 Feb 2017 21:00:18 -0500 Subject: [PATCH] upgrader: Avoid GLib warning on shutdown after failed update The hash tables are only initialized if the initable init completes, but it won't if something goes wrong there. In this case, an origin `unconfigured-state`. Closes: #626 Approved by: jlebon --- src/daemon/rpmostree-sysroot-upgrader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/daemon/rpmostree-sysroot-upgrader.c b/src/daemon/rpmostree-sysroot-upgrader.c index 80bc093a..7c676528 100644 --- a/src/daemon/rpmostree-sysroot-upgrader.c +++ b/src/daemon/rpmostree-sysroot-upgrader.c @@ -261,8 +261,8 @@ rpmostree_sysroot_upgrader_finalize (GObject *object) g_clear_object (&self->origin_merge_deployment); g_clear_pointer (&self->original_origin, (GDestroyNotify)rpmostree_origin_unref); g_clear_pointer (&self->origin, (GDestroyNotify)rpmostree_origin_unref); - g_hash_table_unref (self->packages_to_add); - g_hash_table_unref (self->packages_to_delete); + g_clear_pointer (&self->packages_to_add, (GDestroyNotify)g_hash_table_unref); + g_clear_pointer (&self->packages_to_delete, (GDestroyNotify)g_hash_table_unref); g_free (self->base_revision); g_free (self->final_revision);