Commit: 55d06e0cd58e481edfde10f1f1735ffc88252ac3
Parent: 4e42f2edde72dd4e0e9344e8ebe7721d9beb6663
Author: Inga Stotland <inga.stotland@intel.com>
Committer: Brian Gix <brian.gix@intel.com>
Date: 2020-04-02 04:27:14
Tree: ba32331aa014e4d975c2bd23dcd6e5b8b5ab0bfe

mesh: Fix segfault related to idle config write If node configuration is completely removed from the system, remove all pending writes to the configuration file. Fixes the segfault below: mesh/cfgmod-server.c:node_reset() Node Reset mesh/mesh-config-json.c:mesh_config_destroy() Delete node config /var/lib/bluetooth/mesh/02040d0a060e0a08090b0103070f050c mesh/util.c:del_fobject() RM /var/lib/bluetooth/mesh/02040d0a060e0a08090b0103070f050c/rpl/00000000/0001 mesh/util.c:del_fobject() RMDIR /var/lib/bluetooth/mesh/02040d0a060e0a08090b0103070f050c/rpl/00000000 mesh/util.c:del_fobject() RMDIR /var/lib/bluetooth/mesh/02040d0a060e0a08090b0103070f050c/rpl mesh/util.c:del_fobject() RM /var/lib/bluetooth/mesh/02040d0a060e0a08090b0103070f050c/node.json.bak mesh/util.c:del_fobject() RM /var/lib/bluetooth/mesh/02040d0a060e0a08090b0103070f050c/node.json mesh/util.c:del_fobject() RMDIR /var/lib/bluetooth/mesh/02040d0a060e0a08090b0103070f050c Segmentation fault Program terminated with signal SIGSEGV, Segmentation fault. 0x0000563a35df2ed0 in ?? () 0x00007fd6b131689f in json_object_to_json_string_length (jso=jso@entry=0x563a35dd8d30, flags=flags@entry=2,

Diffstat

M mesh/mesh-config-json.c | 31 ++++++++++++++++++++++++++- - - - -

1 files changed, 26 insertions(+), 5 deletions(-)

View Full Diff | Patch