[WIN32K]
authorJérôme Gardou <jerome.gardou@reactos.org>
Mon, 29 Mar 2010 19:50:49 +0000 (19:50 +0000)
committerJérôme Gardou <jerome.gardou@reactos.org>
Mon, 29 Mar 2010 19:50:49 +0000 (19:50 +0000)
Free the surface instead of unlocking it

svn path=/branches/reactos-yarotows/; revision=46573

subsystems/win32/win32k/eng/pdevobj.c

index a49110a..b7b6647 100644 (file)
@@ -52,13 +52,15 @@ PDEVOBJ_vRelease(PPDEVOBJ ppdev)
     /* Decrease reference count */
     --ppdev->cPdevRefs;
 
+    ASSERT(ppdev->cPdevRefs >= 0) ;
+
     /* Check if references are left */
     if (ppdev->cPdevRefs == 0)
     {
         /* Release surface */
         if(ppdev->pSurface)
         {
-            SURFACE_ShareUnlockSurface(ppdev->pSurface);
+            SURFACE_FreeSurface(ppdev->pSurface);
             ppdev->pfn.DisableSurface(ppdev->dhpdev);
         }