summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-08-13 17:04:39 +0200
committerThomas Haller <thaller@redhat.com>2015-08-13 17:20:07 +0200
commitcad540641730316d345cc95c79620852261e1514 (patch)
tree8e6d39a4a22dbf14f9047930ccd31f97d271c374
parent088e606fcc6af1d5b72456265c62dd14f5a26d76 (diff)
core: avoid assertion "signal_id != 0" on unexported object
When unexporting an object, we might have a notification pending. When the notification is finally processed, it would find no "priv->interfaces" and raise an assertion "idle_emit_properties_changed: assertion 'signal_id != 0' failed" https://bugzilla.redhat.com/show_bug.cgi?id=1253326 Fixes: 073991f5a8271a1e7367ec330fc7c8cf54522ffb
-rw-r--r--src/nm-exported-object.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nm-exported-object.c b/src/nm-exported-object.c
index 5261f2dd54..c829bacb36 100644
--- a/src/nm-exported-object.c
+++ b/src/nm-exported-object.c
@@ -523,6 +523,13 @@ nm_exported_object_unexport (NMExportedObject *self)
nm_bus_manager_unregister_object (nm_bus_manager_get (), iter->data);
g_slist_free_full (priv->interfaces, g_object_unref);
priv->interfaces = NULL;
+
+ if (nm_clear_g_source (&priv->notify_idle_id)) {
+ /* We had a notification queued. Since we removed all interfaces,
+ * the notification is obsolete and must be cleaned up. */
+ g_variant_builder_clear (&priv->pending_notifies);
+ g_variant_builder_init (&priv->pending_notifies, G_VARIANT_TYPE_VARDICT);
+ }
}
static void