- Fix a memory leak in EngUnloadImage
- add an ASSERT

svn path=/trunk/; revision=55970
This commit is contained in:
Timo Kreuzer 2012-03-03 20:00:51 +00:00
parent 40a8a3c833
commit fed10df057
2 changed files with 4 additions and 2 deletions

View file

@ -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 */

View file

@ -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;