[Spice-devel] [PATCH 1/3] display/driver: DrvDeleteDeviceBitmap: log if pdev disabled

Alon Levy alevy at redhat.com
Mon Jul 29 06:14:58 PDT 2013


Alternative is to leak, and this happens regularely. Perhaps we should
be keeping track and destroying these surfaces later (in case no reset
happens in the middle, which destroys all off screen surfaces anyway).
---
 display/driver.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/display/driver.c b/display/driver.c
index b8050de..aa4fe42 100644
--- a/display/driver.c
+++ b/display/driver.c
@@ -1464,6 +1464,11 @@ VOID APIENTRY DrvDeleteDeviceBitmap(DHSURF dhsurf)
 
     DEBUG_PRINT((pdev, 3, "%s: %p: %d\n", __FUNCTION__, pdev, surface_id));
 
+    if (!pdev->enabled) {
+        DEBUG_PRINT((pdev, 3, "%s: device disabled, still destroying\n",
+                    __FUNCTION__));
+    }
+
     ASSERT(pdev, surface_id < pdev->n_surfaces);
 
     DeleteDeviceBitmap(surface->u.pdev, surface_id,
-- 
1.8.3.1



More information about the Spice-devel mailing list