From 81ed5307d3b1e22da9176c56a1fcd62ea28a2ccc Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 7 Aug 2013 16:35:55 +0200 Subject: [PATCH] fixup! core: fix cleanup of NMDevices that fail construction The unref in finalize is not needed, because the hash table gets already freed in dispose. Note that setting available_connections to NULL in dispose is not really needed, because (altough dispose might be called more than once) there is a guarded by "priv->disposed = TRUE;". But leave it for clearity in case somebody tries to access the pointer (which shouldn't happen). Signed-off-by: Thomas Haller --- src/devices/nm-device.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 49ad6a357..edaa2e774 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -4941,8 +4941,6 @@ finalize (GObject *object) g_free (priv->type_desc); if (priv->dhcp_anycast_address) g_byte_array_free (priv->dhcp_anycast_address, TRUE); - if (priv->available_connections) - g_hash_table_unref (priv->available_connections); G_OBJECT_CLASS (nm_device_parent_class)->finalize (object); }