All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dbus: Fix read after free during cleanup
@ 2016-02-10 10:45 Andrew Zaborowski
  2016-02-10 10:45 ` [PATCH 1/9] dbus: Message builder function to copy from an iter Andrew Zaborowski
                   ` (9 more replies)
  0 siblings, 10 replies; 13+ messages in thread
From: Andrew Zaborowski @ 2016-02-10 10:45 UTC (permalink / raw)
  To: ell

[-- Attachment #1: Type: text/plain, Size: 806 bytes --]

subtree_free will be checking if interfaces of objects being freed have
a destroy callback so the interfaces should not be freed before that.
---
 ell/dbus-service.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ell/dbus-service.c b/ell/dbus-service.c
index 5d49836..1e3bb66 100644
--- a/ell/dbus-service.c
+++ b/ell/dbus-service.c
@@ -583,12 +583,12 @@ static void object_manager_free(void *data)
 
 void _dbus_object_tree_free(struct _dbus_object_tree *tree)
 {
+	subtree_free(tree->root);
+
 	l_hashmap_destroy(tree->interfaces,
 			(l_hashmap_destroy_func_t) _dbus_interface_free);
 	l_hashmap_destroy(tree->objects, NULL);
 
-	subtree_free(tree->root);
-
 	l_queue_destroy(tree->object_managers, object_manager_free);
 
 	l_free(tree);
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-02-11 19:52 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-10 10:45 [PATCH] dbus: Fix read after free during cleanup Andrew Zaborowski
2016-02-10 10:45 ` [PATCH 1/9] dbus: Message builder function to copy from an iter Andrew Zaborowski
2016-02-11 19:50   ` Denis Kenzior
2016-02-10 10:45 ` [PATCH 2/9] dbus: Private function to retrieve the tree for a connection Andrew Zaborowski
2016-02-10 10:45 ` [PATCH 3/9] dbus: setters and getters API for properties Andrew Zaborowski
2016-02-10 10:45 ` [PATCH 4/9] dbus: Separate interface registration from instantiation Andrew Zaborowski
2016-02-11 19:52   ` Denis Kenzior
2016-02-10 10:45 ` [PATCH 5/9] dbus: Handle legacy GetProperties and SetProperty automatically Andrew Zaborowski
2016-02-10 10:45 ` [PATCH 6/9] dbus: Implement org.freedesktop.DBus.Properties Andrew Zaborowski
2016-02-10 10:45 ` [PATCH 7/9] dbus: Implement org.freedesktop.DBus.ObjectManager Andrew Zaborowski
2016-02-10 10:45 ` [PATCH 8/9] examples: update dbus-service to new API Andrew Zaborowski
2016-02-10 10:45 ` [PATCH 9/9] test: update to new dbus API Andrew Zaborowski
2016-02-11 19:50 ` [PATCH] dbus: Fix read after free during cleanup Denis Kenzior

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.