VirtualBox

Changeset 4671 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Sep 10, 2007 3:17:44 PM (17 years ago)
Author:
vboxsync
Message:

Must free MDL returned by MmAllocatePagesForMdl with ExFreePool

Location:
trunk/src/VBox/Runtime/r0drv/nt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/nt/alloc-r0drv-nt.cpp

    r4071 r4671  
    5757/**
    5858 * Allocates physical contiguous memory (below 4GB).
    59  * The allocation is page aligned and the content is undefined.
     59 * The allocation is page aligned and its contents is undefined.
    6060 *
    6161 * @returns Pointer to the memory block. This is page aligned.
  • trunk/src/VBox/Runtime/r0drv/nt/memobj-r0drv-nt.cpp

    r4223 r4671  
    8686
    8787                MmFreePagesFromMdl(pMemNt->apMdls[0]);
     88                ExFreePool(pMemNt->apMdls[0]);
    8889                pMemNt->apMdls[0] = NULL;
    8990                pMemNt->cMdls = 0;
     
    122123            {
    123124                MmFreePagesFromMdl(pMemNt->apMdls[0]);
     125                ExFreePool(pMemNt->apMdls[0]);
    124126                pMemNt->apMdls[0] = NULL;
    125127                pMemNt->cMdls = 0;
     
    287289        }
    288290        MmFreePagesFromMdl(pMdl);
     291        ExFreePool(pMdl);
    289292    }
    290293#endif /* !IPRT_TARGET_NT4 */
     
    401404            }
    402405            MmFreePagesFromMdl(pMdl);
     406            ExFreePool(pMdl);
    403407        }
    404408    }
     
    432436        }
    433437        MmFreePagesFromMdl(pMdl);
     438        ExFreePool(pMdl);
    434439    }
    435440    return VERR_NO_MEMORY;
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