VirtualBox

Ignore:
Timestamp:
Jan 22, 2018 9:41:08 PM (7 years ago)
Author:
vboxsync
Message:

VUSBDevice: Fix for leaving the critical section in the error case where it wouldn't get unlocked

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/USB/VUSBDevice.cpp

    r70693 r70694  
    313313                                         pDev->pUsbIns, pNewCfgDesc->Core.bConfigurationValue,
    314314                                         pDev->pCurCfgDesc, pDev->paIfStates, pNewCfgDesc);
     315        RTCritSectLeave(&pDev->pHub->pRootHub->CritSectDevices);
    315316        if (RT_FAILURE(rc))
    316317        {
     
    318319            return false;
    319320        }
    320         RTCritSectLeave(&pDev->pHub->pRootHub->CritSectDevices);
    321321    }
    322322    Log(("vusb: %p[%s]: SET_CONFIGURATION: Selected config %u\n", pDev, pDev->pUsbIns->pszName, iCfg));
     
    461461        RTCritSectEnter(&pDev->pHub->pRootHub->CritSectDevices);
    462462        int rc = vusbDevIoThreadExecSync(pDev, (PFNRT)pDev->pUsbIns->pReg->pfnUsbSetInterface, 3, pDev->pUsbIns, iIf, iAlt);
     463        RTCritSectLeave(&pDev->pHub->pRootHub->CritSectDevices);
    463464        if (RT_FAILURE(rc))
    464465        {
     
    466467            return false;
    467468        }
    468         RTCritSectLeave(&pDev->pHub->pRootHub->CritSectDevices);
    469469    }
    470470
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette