VirtualBox

Changeset 1774 in vbox


Ignore:
Timestamp:
Mar 28, 2007 2:27:16 PM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
19944
Message:

Destroy drivers in filo order.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/PDM.cpp

    r525 r1774  
    333333    {
    334334        for (PPDMLUN pLun = pDevIns->Internal.s.pLunsHC; pLun; pLun = pLun->pNext)
    335             for (PPDMDRVINS pDrvIns = pLun->pTop; pDrvIns; pDrvIns = pDrvIns->Internal.s.pDown)
     335        {
     336            PPDMDRVINS pDrvIns;
     337
     338            /* Find the bottom driver */
     339            for (pDrvIns = pLun->pTop; pDrvIns && pDrvIns->Internal.s.pDown; pDrvIns = pDrvIns->Internal.s.pDown)
     340                ;
     341
     342            /* And destroy them one at a time from the bottom up */
     343            while (pDrvIns)
     344            {
     345                PPDMDRVINS pDrvNext = pDrvIns->Internal.s.pUp;
     346
    336347                if (pDrvIns->pDrvReg->pfnDestruct)
    337348                {
     
    341352                    TMR3TimerDestroyDriver(pVM, pDrvIns);
    342353                }
     354                pDrvIns = pDrvNext;
     355            }
     356        }
    343357
    344358        if (pDevIns->pDevReg->pfnDestruct)
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