Messages in this thread Patch in this message | | | From | David Herrmann <> | Subject | [PATCH 6/6] kdbus: fix NULL-deref in activator cleanup | Date | Thu, 2 Jul 2015 10:28:34 +0200 |
| |
Right now, we always assume an activator has a valid name and conn->activator_of is set. However, this assumption is not true if the setup of the activator fails. In those cases, the ->flags field indicates an activator, but the name might not have been claimed, yet.
Fix the destructor of connections to not assume all activators have claimed names.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com> --- ipc/kdbus/names.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ipc/kdbus/names.c b/ipc/kdbus/names.c index d77ee08..057f806 100644 --- a/ipc/kdbus/names.c +++ b/ipc/kdbus/names.c @@ -444,7 +444,7 @@ void kdbus_name_release_all(struct kdbus_name_registry *reg, down_write(®->rwlock); - if (kdbus_conn_is_activator(conn)) { + if (conn->activator_of) { activator = conn->activator_of->activator; conn->activator_of->activator = NULL; } -- 2.4.5
| |