VirtualBox

Changeset 39845 in vbox


Ignore:
Timestamp:
Jan 23, 2012 9:57:31 PM (13 years ago)
Author:
vboxsync
Message:

AHCI: Fix memory leak after recent optimization

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/DevAHCI.cpp

    r39828 r39845  
    51705170            RTMemPageFree(pAhciReq->pvAlloc, pAhciReq->cbAlloc);
    51715171
    5172         pAhciReq->pvAlloc = RTMemPageAlloc(RT_ALIGN_Z(cb, _4K));
     5172        pAhciReq->cbAlloc = RT_ALIGN_Z(cb, _4K);
     5173        pAhciReq->pvAlloc = RTMemPageAlloc(pAhciReq->cbAlloc);
    51735174        pAhciReq->cAllocTooMuch = 0;
     5175        if (RT_UNLIKELY(!pAhciReq->pvAlloc))
     5176            pAhciReq->cbAlloc = 0;
    51745177    }
    51755178
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