device: fix frozen notify signals on unrealize error path

If unrealize() failed we returned without thawing notify signals. Fix
this by moving g_object_freeze_notify() after the
unrealization/deletion but before the properties are reset in
unrealize_notify().

Fixes: a93807c288
(cherry picked from commit 24a7f88bc5)
This commit is contained in:
Beniamino Galvani 2017-10-04 14:30:57 +02:00
parent 0288f58667
commit 5bd8269315

View file

@ -3257,7 +3257,6 @@ nm_device_unrealize (NMDevice *self, gboolean remove_resources, GError **error)
g_return_val_if_fail (priv->iface != NULL, FALSE);
g_return_val_if_fail (priv->real, FALSE);
g_object_freeze_notify (G_OBJECT (self));
ifindex = nm_device_get_ifindex (self);
@ -3274,6 +3273,7 @@ nm_device_unrealize (NMDevice *self, gboolean remove_resources, GError **error)
}
}
g_object_freeze_notify (G_OBJECT (self));
NM_DEVICE_GET_CLASS (self)->unrealize_notify (self);
_parent_set_ifindex (self, 0, FALSE);