This fixes a segmentation fault introduced by earlier changes. Segmentation fault was used by accessing a queu that has been destroyed, but the corresponding pointer hasn't been set to NULL. --- mesh/node.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mesh/node.c b/mesh/node.c index ad94d885c..8e9da8988 100644 --- a/mesh/node.c +++ b/mesh/node.c @@ -260,12 +260,16 @@ static void free_node_resources(void *data) /* Unregister io callbacks */ if (node->net) mesh_net_detach(node->net); + mesh_net_free(node->net); + node->net = NULL; l_queue_destroy(node->elements, element_free); - l_free(node->comp); + node->elements = NULL; free_node_dbus_resources(node); + + l_free(node->comp); l_free(node); } -- 2.21.0