summaryrefslogtreecommitdiff
path: root/mesh/agent.c
diff options
context:
space:
mode:
authorInga Stotland <inga.stotland@intel.com>2019-01-11 18:40:55 -0800
committerBrian Gix <brian.gix@intel.com>2019-01-14 14:02:09 -0800
commit9ce5a51872e8e145aa07790f4ddcfeba89530197 (patch)
tree38bdef0c3c6248b55fad635d1330394b43621ad6 /mesh/agent.c
parent1ec20825822ab9d05028f88d13bf6765dd29efe8 (diff)
downloadbluez-9ce5a51872e8e145aa07790f4ddcfeba89530197.tar.gz
mesh: Clean up when finishing the Join call
Consolidate multiple instances where the pending Join data is freed into calling one function free_pending_join_call(). Also, add checks for NULL data in cleanup functions for storage, agent and provisioning acceptor.
Diffstat (limited to 'mesh/agent.c')
-rw-r--r--mesh/agent.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesh/agent.c b/mesh/agent.c
index c6ff11802..88ad84d79 100644
--- a/mesh/agent.c
+++ b/mesh/agent.c
@@ -210,7 +210,7 @@ static void agent_free(void *agent_data)
void mesh_agent_remove(struct mesh_agent *agent)
{
- if (!l_queue_find(agents, simple_match, agent))
+ if (!agent || !l_queue_find(agents, simple_match, agent))
return;
agent_free(agent);