mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-08 14:48:10 +02:00
core: fix NMDeviceBond:dispose() to chain up
This commit is contained in:
parent
925119074d
commit
4ad810fdf4
1 changed files with 3 additions and 7 deletions
|
|
@ -45,7 +45,6 @@ G_DEFINE_TYPE (NMDeviceBond, nm_device_bond, NM_TYPE_DEVICE_WIRED)
|
||||||
#define NM_BOND_ERROR (nm_bond_error_quark ())
|
#define NM_BOND_ERROR (nm_bond_error_quark ())
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
gboolean disposed;
|
|
||||||
GSList *slaves;
|
GSList *slaves;
|
||||||
} NMDeviceBondPrivate;
|
} NMDeviceBondPrivate;
|
||||||
|
|
||||||
|
|
@ -506,15 +505,12 @@ dispose (GObject *object)
|
||||||
NMDeviceBondPrivate *priv = NM_DEVICE_BOND_GET_PRIVATE (self);
|
NMDeviceBondPrivate *priv = NM_DEVICE_BOND_GET_PRIVATE (self);
|
||||||
GSList *iter;
|
GSList *iter;
|
||||||
|
|
||||||
if (priv->disposed) {
|
|
||||||
G_OBJECT_CLASS (nm_device_bond_parent_class)->dispose (object);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
priv->disposed = TRUE;
|
|
||||||
|
|
||||||
for (iter = priv->slaves; iter; iter = g_slist_next (iter))
|
for (iter = priv->slaves; iter; iter = g_slist_next (iter))
|
||||||
release_slave (NM_DEVICE (self), ((SlaveInfo *) iter->data)->slave);
|
release_slave (NM_DEVICE (self), ((SlaveInfo *) iter->data)->slave);
|
||||||
g_slist_free (priv->slaves);
|
g_slist_free (priv->slaves);
|
||||||
|
priv->slaves = NULL;
|
||||||
|
|
||||||
|
G_OBJECT_CLASS (nm_device_bond_parent_class)->dispose (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue