VirtualBox

Changeset 48636 in vbox for trunk


Ignore:
Timestamp:
Sep 23, 2013 12:35:22 PM (11 years ago)
Author:
vboxsync
Message:

RTLdr: don't leak RTLDRMODINTERNAL::pReader.

Location:
trunk/src/VBox/Runtime/common/ldr
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/ldr/ldr.cpp

    r46593 r48636  
    159159    pMod->eState = LDR_STATE_INVALID;
    160160    pMod->u32Magic++;
     161    if (pMod->pReader)
     162    {
     163        rc = pMod->pReader->pfnDestroy(pMod->pReader);
     164        AssertRC(rc);
     165        pMod->pReader = NULL;
     166    }
    161167    RTMemFree(pMod);
    162168
  • trunk/src/VBox/Runtime/common/ldr/ldrPE.cpp

    r46273 r48636  
    15161516        pModPe->pvBits = NULL;
    15171517    }
    1518     if (pModPe->Core.pReader)
    1519     {
    1520         int rc = pModPe->Core.pReader->pfnDestroy(pModPe->Core.pReader);
    1521         AssertRC(rc);
    1522         pModPe->Core.pReader = NULL;
    1523     }
    15241518    return VINF_SUCCESS;
    15251519}
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