diff options
author | Inga Stotland <inga.stotland@intel.com> | 2020-12-02 13:11:51 -0800 |
---|---|---|
committer | Brian Gix <brian.gix@intel.com> | 2020-12-04 10:07:30 -0800 |
commit | faa1f74a91e95d04b66a9350a3daf9b35ec63070 (patch) | |
tree | ff3744b1bf53328082b6122791e57c442b0f20e2 /mesh/node.c | |
parent | 1eb69c3c81517e0d4ba12128b0efd4d04fa478f6 (diff) | |
download | bluez-faa1f74a91e95d04b66a9350a3daf9b35ec63070.tar.gz |
mesh: Zero out config node struct before initializing
This memsets all the fields of mesh_db_node to zero prior to intializing
some fields in mesh_config_node struct and creating a brand new node
configuration. Just a precaution against having uninitialized items.
Diffstat (limited to 'mesh/node.c')
-rw-r--r-- | mesh/node.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mesh/node.c b/mesh/node.c index 35293e0f0..4bc11309b 100644 --- a/mesh/node.c +++ b/mesh/node.c @@ -856,6 +856,8 @@ static void convert_node_to_storage(struct mesh_node *node, { const struct l_queue_entry *entry; + memset(db_node, 0, sizeof(struct mesh_config_node)); + db_node->cid = node->comp.cid; db_node->pid = node->comp.pid; db_node->vid = node->comp.vid; |