Changeset 100772 in vbox for trunk/src/VBox/Main/src-server
- Timestamp:
- Aug 1, 2023 5:34:48 PM (18 months ago)
- Location:
- trunk/src/VBox/Main/src-server
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/HostImpl.cpp
r100108 r100772 217 217 218 218 #ifdef VBOX_WITH_USB 219 USBDeviceFilterList llChildren; // all USB device filters219 USBDeviceFilterList llChildren; // all global USB device filters 220 220 USBDeviceFilterList llUSBDeviceFilters; // USB device filters in use by the USB proxy service 221 221 … … 535 535 536 536 #ifdef VBOX_WITH_USB 537 /* uninit all USB device filters still referenced by clients 538 * Note! HostUSBDeviceFilter::uninit() will modify llChildren. 539 * This list should be already empty, but better be safe than sorry. */ 540 while (!m->llChildren.empty()) 541 { 542 ComObjPtr<HostUSBDeviceFilter> &pChild = m->llChildren.front(); 543 pChild->uninit(); 544 m->llChildren.pop_front(); 537 /* Clean up the list of global USB device filters. */ 538 if (!m->llChildren.empty()) 539 { 540 /* 541 * i_removeChild() modifies llChildren so we make a copy to traverse here. The 542 * removal of a global USB device filter from the llChildren list at this point 543 * in Host:uninit() will trigger HostUSBDeviceFilter::FinalRelease() -> 544 * HostUSBDeviceFilter::uninit() which will complete the remainder of the clean-up 545 * for each global USB device filter and thus we don't need to call 546 * HostUSBDeviceFilter::uninit() directly here ourselves. 547 */ 548 USBDeviceFilterList llChildrenCopy(m->llChildren); 549 for (USBDeviceFilterList::iterator it = llChildrenCopy.begin(); 550 it != llChildrenCopy.end(); 551 ++it) 552 i_removeChild(*it); 545 553 } 546 554 -
trunk/src/VBox/Main/src-server/USBDeviceFilterImpl.cpp
r98292 r100772 976 976 bd.free(); 977 977 978 mParent->i_removeChild(this);979 980 978 unconst(mParent) = NULL; 981 979 }
Note:
See TracChangeset
for help on using the changeset viewer.