summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Shaw <joeshaw@novell.com>2005-03-09 17:30:38 +0000
committerJoe Shaw <joeshaw@novell.com>2005-03-09 17:30:38 +0000
commitc9a67837eae43e78ce6b3dba9a3c9ed4942d87ff (patch)
treec272364cfa669b1e9aba77b0420e38c9f8a97159
parentf6b1b60adf2fbfe2dc867ef935f040382544aa95 (diff)
2005-03-09 Joe Shaw <joeshaw@novell.com>
* dbus/dbus-object-tree.c (_dbus_object_tree_unregister_and_unlock): If checks are enabled and we try to unregister a path that's not registered, still go through the process of unlocking and don't just return.
-rw-r--r--ChangeLog7
-rw-r--r--dbus/dbus-object-tree.c6
2 files changed, 12 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index b4241bb9..1f5aa01f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-03-09 Joe Shaw <joeshaw@novell.com>
+
+ * dbus/dbus-object-tree.c
+ (_dbus_object_tree_unregister_and_unlock): If checks are enabled
+ and we try to unregister a path that's not registered, still go
+ through the process of unlocking and don't just return.
+
2005-03-08 Joe Shaw <joeshaw@novell.com>
Fix a bunch of lifecycle and memory management problems
diff --git a/dbus/dbus-object-tree.c b/dbus/dbus-object-tree.c
index afce2442..f4fa82d4 100644
--- a/dbus/dbus-object-tree.c
+++ b/dbus/dbus-object-tree.c
@@ -451,6 +451,9 @@ _dbus_object_tree_unregister_and_unlock (DBusObjectTree *tree,
_dbus_assert (path != NULL);
+ unregister_function = NULL;
+ user_data = NULL;
+
subtree = find_subtree (tree, path, &i);
#ifndef DBUS_DISABLE_CHECKS
@@ -459,7 +462,7 @@ _dbus_object_tree_unregister_and_unlock (DBusObjectTree *tree,
_dbus_warn ("Attempted to unregister path (path[0] = %s path[1] = %s) which isn't registered\n",
path[0] ? path[0] : "null",
path[1] ? path[1] : "null");
- return;
+ goto unlock;
}
#else
_dbus_assert (subtree != NULL);
@@ -495,6 +498,7 @@ _dbus_object_tree_unregister_and_unlock (DBusObjectTree *tree,
}
subtree = NULL;
+unlock:
connection = tree->connection;
/* Unlock and call application code */