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 <thaller@redhat.com>
This commit is contained in:

committed by
Dan Williams

parent
588547b343
commit
81ed5307d3
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user