mesh: Fix and clean up model publication code
authorInga Stotland <inga.stotland@intel.com>
Sun, 30 Jun 2019 06:43:55 +0000 (23:43 -0700)
committerAnupam Roy <anupam.r@samsung.com>
Tue, 17 Dec 2019 15:20:03 +0000 (20:50 +0530)
commit422c0b3526e8fb190e3295a4f113f9b1f3e7463f
tree567facd3994a488975fb13cdbb1eddef842f1f50
parent11376b433e932f96b130be23a4f5f581a146cc6d
mesh: Fix and clean up model publication code

This adds proper checks for model publication removal:
the publication is not virtual and the publication address is set to zero,
i.e., UNASSIGNED_ADDRESS.
Also removes double memory allocation for model publication and
miscellaneous redundancies.

Change-Id: Ib41b16a583de598c38ffd176bca5812f1bf96375
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
mesh/model.c
mesh/model.h