From 09a233a15f071acd242b2a1bddc66eee4fbbde32 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Mon, 12 Jun 2017 11:46:54 +0200 Subject: [PATCH] hfp: free hfp connection struct on disconnect --- src/classic/hfp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/classic/hfp.c b/src/classic/hfp.c index 6db9aa08a..735bc3aef 100644 --- a/src/classic/hfp.c +++ b/src/classic/hfp.c @@ -358,7 +358,8 @@ static hfp_connection_t * create_hfp_connection_context(void){ } static void remove_hfp_connection_context(hfp_connection_t * hfp_connection){ - btstack_linked_list_remove(&hfp_connections, (btstack_linked_item_t*) hfp_connection); + btstack_linked_list_remove(&hfp_connections, (btstack_linked_item_t*) hfp_connection); + btstack_memory_hfp_connection_free(hfp_connection); } static hfp_connection_t * provide_hfp_connection_context_for_bd_addr(bd_addr_t bd_addr){