From f55b4857ed8a828f75c2034e6d1bbec60d56abc1 Mon Sep 17 00:00:00 2001 From: Yonit Halperin Date: Mon, 12 Jul 2010 10:20:12 +0300 Subject: Fix memory leak: deleting primary surface device bitmap when it is disabled. The bug caused BSOD: SESSION_HAS_VALID_POOL_ON_EXIT on switching users/log off (after the driver is disabled and enabled back again, while the miniport is not restarted). --- display/driver.c | 10 +--------- display/qxldd.h | 3 --- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/display/driver.c b/display/driver.c index 39d0aa9..7dce00e 100644 --- a/display/driver.c +++ b/display/driver.c @@ -929,23 +929,15 @@ VOID DrvDisableSurface(DHPDEV in_pdev) DEBUG_PRINT((NULL, 1, "%s: 0x%lx\n", __FUNCTION__, pdev)); DisableQXLPrimarySurface(pdev); - //DisableQXLAllSurfaces(pdev); UnmapFB(pdev); if (pdev->surf) { DeleteDeviceBitmap(pdev, 0, DEVICE_BITMAP_ALLOCATION_TYPE_SURF0); + EngDeleteSurface(pdev->surf); pdev->surf = NULL; } - if (pdev->draw_surf) { - drawarea.bitmap = pdev->draw_bitmap; - drawarea.surf_obj = pdev->draw_surf; - FreeDrawArea(&drawarea); - pdev->draw_surf = NULL; - pdev->draw_bitmap = NULL; - } - if (pdev->surfaces_info) { EngFreeMem(pdev->surfaces_info); pdev->surfaces_info = NULL; diff --git a/display/qxldd.h b/display/qxldd.h index 86438fe..ffa8b8c 100644 --- a/display/qxldd.h +++ b/display/qxldd.h @@ -242,9 +242,6 @@ typedef struct PDev { PEVENT cursor_event; PEVENT sleep_event; - HSURF draw_bitmap; - SURFOBJ *draw_surf; - UINT32 log_port; UINT8 *log_buf; UINT32 *log_level; -- cgit v1.2.3