avdtp: free stream endpoints and connection on l2cap close

This commit is contained in:
Matthias Ringwald 2017-06-12 11:44:44 +02:00
parent 47ec446b23
commit 671c66c199

View File

@ -556,8 +556,9 @@ void avdtp_packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet
btstack_linked_list_iterator_init(&it, stream_endpoints); btstack_linked_list_iterator_init(&it, stream_endpoints);
while (btstack_linked_list_iterator_has_next(&it)){ while (btstack_linked_list_iterator_has_next(&it)){
avdtp_stream_endpoint_t * _stream_endpoint = (avdtp_stream_endpoint_t *)btstack_linked_list_iterator_next(&it); avdtp_stream_endpoint_t * _stream_endpoint = (avdtp_stream_endpoint_t *)btstack_linked_list_iterator_next(&it);
avdtp_initialize_stream_endpoint(_stream_endpoint); btstack_memory_avdtp_stream_endpoint_free(_stream_endpoint);
} }
btstack_memory_avdtp_connection_free(connection);
break; break;
} }
break; break;