tools/mesh-cfgclient: Fix errors found by static analysis
authorInga Stotland <inga.stotland@intel.com>
Mon, 26 Oct 2020 21:08:17 +0000 (14:08 -0700)
committerAbhay Agarwal <ay.agarwal@samsung.com>
Mon, 28 Dec 2020 06:20:04 +0000 (11:50 +0530)
commit683145d52f3aef0e0cd02c5cbf9b80756420a6ac
tree2ceb236b3126114a003b494207b6b7100ad4ffc6
parente5b0c986d55b343d5114e08ffd1c8f460e6c96d6
tools/mesh-cfgclient: Fix errors found by static analysis

This fixes a NULL pointer dereference error in subscription_cmd().

Also re-order calling sequence for l_free() & l_queue_remove()
in msg_recvd(): even though technically it is not a bug to pass
a value of a freed pointer to l_queue_remove(), it's a poor form
and confuses the analyzer.

Change-Id: I6863f60c23dbda3e2030bee7d8d7c8fe666887de
Signed-off-by: anuj.bhumiya <anuj.bhumiya@samsung.com>
tools/mesh/cfgcli.c