third_party/virtualbox/src/VBox/Devices/USB/VUSBUrb.cpp
/**
 * Frees the extra state data associated with a message pipe.
 *
 * @param   pExtra      The data.
 */
Frees the extra state data associated with a message pipe.
@param   pExtra      The data.
Frees the extra state data associated with a message pipe . @param pExtra The data .
void vusbMsgFreeExtraData(PVUSBCTRLEXTRA pExtra)
{
    if (!pExtra)
        return;
    if (pExtra->Urb.enmState != VUSBURBSTATE_CANCELLED)
    {
        pExtra->Urb.u32Magic = 0;
        pExtra->Urb.enmState = VUSBURBSTATE_FREE;
        if (pExtra->Urb.pszDesc)
            RTStrFree(pExtra->Urb.pszDesc);
        RTMemFree(pExtra);
    }
    else
        pExtra->Urb.pVUsb->pvFreeCtx = NULL; 
}
void vusbMsgFreeExtraData ( PVUSBCTRLEXTRA pExtra ) { if ( ! pExtra ) return ; if ( pExtra -> Urb . enmState != VUSBURBSTATE_CANCELLED ) { pExtra -> Urb . u32Magic = 0 ; pExtra -> Urb . enmState = VUSBURBSTATE_FREE ; if ( pExtra -> Urb . pszDesc ) RTStrFree ( pExtra -> Urb . pszDesc ) ; RTMemFree ( pExtra ) ; } else pExtra -> Urb . pVUsb -> pvFreeCtx = NULL ; }
Frees the extra state data associated with a message pipe.
Frees the extra state data associated with a message pipe .
/* see vusbMsgFreeUrb */