mirror of
https://github.com/reactos/reactos.git
synced 2025-01-05 22:12:46 +00:00
[WIN32K]
- Fix a memory leak in EngUnloadImage - add an ASSERT svn path=/trunk/; revision=55970
This commit is contained in:
parent
40a8a3c833
commit
fed10df057
2 changed files with 4 additions and 2 deletions
|
@ -98,6 +98,7 @@ LDEVOBJ_vFreeLDEV(PLDEVOBJ pldev)
|
||||||
{
|
{
|
||||||
/* Make sure we don't have a driver loaded */
|
/* Make sure we don't have a driver loaded */
|
||||||
ASSERT(pldev && pldev->pGdiDriverInfo == NULL);
|
ASSERT(pldev && pldev->pGdiDriverInfo == NULL);
|
||||||
|
ASSERT(pldev->cRefs == 0);
|
||||||
|
|
||||||
/* Free the memory */
|
/* Free the memory */
|
||||||
ExFreePoolWithTag(pldev, GDITAG_LDEV);
|
ExFreePoolWithTag(pldev, GDITAG_LDEV);
|
||||||
|
@ -472,8 +473,9 @@ EngUnloadImage(
|
||||||
if (pldev->pldevNext)
|
if (pldev->pldevNext)
|
||||||
pldev->pldevNext->pldevPrev = pldev->pldevPrev;
|
pldev->pldevNext->pldevPrev = pldev->pldevPrev;
|
||||||
|
|
||||||
/* Unload the image */
|
/* Unload the image and free the LDEV */
|
||||||
LDEVOBJ_vUnloadImage(pldev);
|
LDEVOBJ_vUnloadImage(pldev);
|
||||||
|
LDEVOBJ_vFreeLDEV(pldev);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Unlock loader */
|
/* Unlock loader */
|
||||||
|
|
|
@ -190,7 +190,7 @@ PDEVOBJ_pdmMatchDevMode(
|
||||||
{
|
{
|
||||||
PGRAPHICS_DEVICE pGraphicsDevice;
|
PGRAPHICS_DEVICE pGraphicsDevice;
|
||||||
PDEVMODEW pdmCurrent;
|
PDEVMODEW pdmCurrent;
|
||||||
INT i;
|
ULONG i;
|
||||||
DWORD dwFields;
|
DWORD dwFields;
|
||||||
|
|
||||||
pGraphicsDevice = ppdev->pGraphicsDevice;
|
pGraphicsDevice = ppdev->pGraphicsDevice;
|
||||||
|
|
Loading…
Reference in a new issue