VirtualBox

Ignore:
Timestamp:
Oct 3, 2014 6:40:54 PM (10 years ago)
Author:
vboxsync
Message:

Eliminating some more kernel32.dll dependencies, marking APIs we like to use early as OK.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/win/SUPHardenedVerifyProcess-win.cpp

    r52875 r52940  
    16061606                                       pEntry->pszName, cbBits, cbBits);
    16071607
    1608         pEntry->pbBits = (uint8_t *)suplibHardenedAllocZ(cbBits);
     1608        pEntry->pbBits = (uint8_t *)RTMemAllocZ(cbBits);
    16091609        if (!pEntry->pbBits)
    16101610            return supHardNtVpSetInfo1(pErrInfo, VERR_SUP_VP_NO_MEMORY, "Failed to allocate %zu bytes for image %s.",
     
    16291629    if (pEntry->pbBits)
    16301630    {
    1631         suplibHardenedFree(pEntry->pbBits);
     1631        RTMemFree(pEntry->pbBits);
    16321632        pEntry->pbBits = NULL;
    16331633    }
     
    19261926    int             rc;
    19271927    ULONG           cbUniStr = sizeof(UNICODE_STRING) + RTPATH_MAX * sizeof(RTUTF16);
    1928     PUNICODE_STRING pUniStr  = (PUNICODE_STRING)suplibHardenedAllocZ(cbUniStr);
     1928    PUNICODE_STRING pUniStr  = (PUNICODE_STRING)RTMemAllocZ(cbUniStr);
    19291929    if (!pUniStr)
    19301930        return supHardNtVpSetInfo2(pThis, VERR_SUP_VP_NO_MEMORY,
     
    19471947        rc = supHardNtVpSetInfo2(pThis, VERR_SUP_VP_NT_QI_PROCESS_NM_ERROR,
    19481948                                 "NtQueryInformationProcess/ProcessImageFileName failed: %#x", rcNt);
    1949     suplibHardenedFree(pUniStr);
     1949    RTMemFree(pUniStr);
    19501950    if (RT_FAILURE(rc))
    19511951        return rc;
     
    21082108         * Allocate and initialize memory for the state.
    21092109         */
    2110         PSUPHNTVPSTATE pThis = (PSUPHNTVPSTATE)suplibHardenedAllocZ(sizeof(*pThis));
     2110        PSUPHNTVPSTATE pThis = (PSUPHNTVPSTATE)RTMemAllocZ(sizeof(*pThis));
    21112111        if (pThis)
    21122112        {
     
    21372137                supHardNTLdrCacheDeleteEntry(&pThis->aImages[i].CacheEntry);
    21382138#endif
    2139             suplibHardenedFree(pThis);
     2139            RTMemFree(pThis);
    21402140        }
    21412141        else
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