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
This commit is contained in:
Beniamino Galvani 2017-10-04 14:30:57 +02:00
parent 7845423881
commit 24a7f88bc5

View file

@ -3431,7 +3431,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);
@ -3448,6 +3447,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);