diff options
author | Inga Stotland <inga.stotland@intel.com> | 2021-02-10 18:55:58 -0800 |
---|---|---|
committer | Brian Gix <brian.gix@intel.com> | 2021-02-10 18:58:35 -0800 |
commit | 1f4ec8fb9d36fb7678385fd631459d80b57fc662 (patch) | |
tree | 1b8584c51ab3b0590c3639328df8eaacf37a28ae /mesh | |
parent | 1ecf167cec1696e266de58db6cd904f43c4b532e (diff) | |
download | bluez-1f4ec8fb9d36fb7678385fd631459d80b57fc662.tar.gz |
mesh: Clear node's agent pointer after agent removal
When a node is created/provisioned/imported, the new node's agent
is removed. The corresponding pointer in the node structure needs
to be set to NULL to avoid pointing to freed memory.
Diffstat (limited to 'mesh')
-rw-r--r-- | mesh/node.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mesh/node.c b/mesh/node.c index 4bc11309b..e81aa82fe 100644 --- a/mesh/node.c +++ b/mesh/node.c @@ -2321,6 +2321,7 @@ void node_finalize_new_node(struct mesh_node *node, struct mesh_io *io) free_node_dbus_resources(node); mesh_agent_remove(node->agent); + node->agent = NULL; node->busy = false; |