remove hci h4 transport data_source from run_loop before free

This commit is contained in:
matthias.ringwald 2009-07-12 19:42:27 +00:00
parent 71974eda64
commit 855ca3c659

View File

@ -121,8 +121,14 @@ static int h4_open(void *transport_config){
}
static int h4_close(){
// first remove run loop handler
run_loop_remove(hci_transport_h4->ds);
// close device
close(hci_transport_h4->ds->fd);
free(hci_transport_h4->ds);
// free struct
hci_transport_h4->ds = NULL;
return 0;
}