From 9e0e5fabb8e89cd11448e0e637a4130dee5beb8f Mon Sep 17 00:00:00 2001 From: Inga Stotland Date: Wed, 12 Aug 2020 22:01:50 -0700 Subject: [PATCH] mesh: Don't add config server when loading from storage Adding a sonfig server model when loading from storage is unnecessary, since the daemon-generated stored configuration always contains config server model. This also fixes a memory leak caused by bad parameters passed to mesh_model_add() Change-Id: I2568e8a2c910e40fec6c910d65f5f7d432726c4a Signed-off-by: anuj.bhumiya --- mesh/node.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/mesh/node.c b/mesh/node.c index 7c0788a..546cd7b 100644 --- a/mesh/node.c +++ b/mesh/node.c @@ -369,9 +369,6 @@ static bool add_elements_from_storage(struct mesh_node *node, if (!add_element_from_storage(node, entry->data)) return false; - /* Add configuration server model on the primary element */ - mesh_model_add(node, PRIMARY_ELE_IDX, CONFIG_SRV_MODEL, NULL); - return true; } -- 2.7.4