Skip to content

Commit 4e73caa

Browse files
committed
[WIN32K]
- Fix reference leaks in EngAssociateSurface and EngModifySurface svn path=/branches/GSoC_2011/GdiFontDriver/; revision=56004
1 parent 49ea72d commit 4e73caa

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

subsystems/win32/win32k/eng/surface.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,8 @@ EngAssociateSurface(
388388
psurf->flags &= ~HOOK_FLAGS;
389389
psurf->flags |= (flHooks & HOOK_FLAGS);
390390

391-
/* Get palette */
391+
/* Get new palette */
392+
if (psurf->ppal) PALETTE_ShareUnlockPalette(psurf->ppal);
392393
psurf->ppal = PALETTE_ShareLockPalette(ppdev->devinfo.hpalDefault);
393394

394395
SURFACE_ShareUnlockSurface(psurf);
@@ -432,7 +433,8 @@ EngModifySurface(
432433
psurf->flags &= ~HOOK_FLAGS;
433434
psurf->flags |= (flHooks & HOOK_FLAGS);
434435

435-
/* Get palette */
436+
/* Get new palette */
437+
if (psurf->ppal) PALETTE_ShareUnlockPalette(psurf->ppal);
436438
psurf->ppal = PALETTE_ShareLockPalette(ppdev->devinfo.hpalDefault);
437439

438440
SURFACE_ShareUnlockSurface(psurf);

0 commit comments

Comments
 (0)