From 1e6cebb82bf449a7e3fa8fe12d6c41d42a2bcf9a Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Tue, 20 Aug 2019 18:51:37 +0200 Subject: [PATCH] mesh: free outgoing segment in mesh_lower_transport_reset for unit tests --- src/mesh/mesh_lower_transport.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/mesh/mesh_lower_transport.c b/src/mesh/mesh_lower_transport.c index 3a06add93..c848264cf 100644 --- a/src/mesh/mesh_lower_transport.c +++ b/src/mesh/mesh_lower_transport.c @@ -757,19 +757,17 @@ static void mesh_lower_transport_reset_network_pdus(btstack_linked_list_t *list) } void mesh_lower_transport_dump(void){ - // static btstack_linked_list_t upper_transport_control; - // static btstack_linked_list_t upper_transport_access; mesh_lower_transport_dump_network_pdus("lower_transport_incoming", &lower_transport_incoming); } void mesh_lower_transport_reset(void){ - // static btstack_linked_list_t upper_transport_control; - // static btstack_linked_list_t upper_transport_access; mesh_lower_transport_reset_network_pdus(&lower_transport_incoming); if (lower_transport_outgoing_pdu){ mesh_transport_pdu_free(lower_transport_outgoing_pdu); lower_transport_outgoing_pdu = NULL; } + mesh_network_pdu_free(lower_transport_outgoing_segment); + lower_transport_outgoing_segment = NULL; } void mesh_lower_transport_init(){