mesh: Fix adding model app key binding
authorInga Stotland <inga.stotland@intel.com>
Fri, 22 Mar 2019 02:26:10 +0000 (19:26 -0700)
committerAnupam Roy <anupam.r@samsung.com>
Tue, 17 Dec 2019 14:18:42 +0000 (19:48 +0530)
commit58e13f7162ecd5e7d7a401462be5c99061e9ff5c
treeb8b65920ebdae5640179d07f5704cc9bfe59cc95
parentdd78bc00f142c26a03cae9ad111942a2a7002d82
mesh: Fix adding model app key binding

This fixes the situation when a new app key binding is being
added to a model and the list of bindings does not exist yet.
If the list does not exist, it is created and the binding is
added to it.

Also, remove unnecessary memory alloc check when model subscriptions
are added.

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