From c48ba1ab10035759054da2ec54eb7b613415d8ab Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Tue, 25 Feb 2014 16:41:33 -0500 Subject: [PATCH] devices: fix "slaves" property notification in release_slaves Bond, bridge, and team were notifying their "slaves" properties before the slave actually got removed from priv->slaves, meaning that anything that looked at the property directly from a notify::slaves handler would see the old value. Fix that. --- src/devices/nm-device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 29e05288f3..1f5fb718d3 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -956,6 +956,7 @@ nm_device_release_one_slave (NMDevice *dev, NMDevice *slave) info = find_slave_info (dev, slave); if (!info) return FALSE; + priv->slaves = g_slist_remove (priv->slaves, info); if (info->enslaved) { success = NM_DEVICE_GET_CLASS (dev)->release_slave (dev, slave); @@ -968,7 +969,6 @@ nm_device_release_one_slave (NMDevice *dev, NMDevice *slave) reason = priv->state_reason; nm_device_slave_notify_release (info->slave, reason); - priv->slaves = g_slist_remove (priv->slaves, info); free_slave_info (info); /* Ensure the device's hardware address is up-to-date; it often changes