mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-29 13:20:39 +00:00
remove hci h4 transport data_source from run_loop before free
This commit is contained in:
parent
71974eda64
commit
855ca3c659
@ -121,8 +121,14 @@ static int h4_open(void *transport_config){
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int h4_close(){
|
static int h4_close(){
|
||||||
|
// first remove run loop handler
|
||||||
|
run_loop_remove(hci_transport_h4->ds);
|
||||||
|
|
||||||
|
// close device
|
||||||
close(hci_transport_h4->ds->fd);
|
close(hci_transport_h4->ds->fd);
|
||||||
free(hci_transport_h4->ds);
|
free(hci_transport_h4->ds);
|
||||||
|
|
||||||
|
// free struct
|
||||||
hci_transport_h4->ds = NULL;
|
hci_transport_h4->ds = NULL;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user