[Spice-devel] [PATCH] qxl:fix double free surface when create device bitmap failed

Coolper Chen lxchen at tnsoft.com.cn
Wed Dec 8 17:07:23 PST 2010


DrvCreateDeviceBitmap will call FreeSurface function when
CreateDeviceBitmap failed, no need call FreeSurface function in
CreateDeviceBitmap function;
It fixes the windows XP bluescreen problem that I encounter.

diff --git a/display/surface.c b/display/surface.c
index 7146b32..38200aa 100644
--- a/display/surface.c
+++ b/display/surface.c
@@ -152,7 +152,6 @@ HBITMAP CreateDeviceBitmap(PDev *pdev, SIZEL size,
ULONG format, QXLPHYSICAL *ph
 out_error3:
     QXLDelSurface(pdev, *base_mem, allocation_type);
 out_error2:
-    FreeSurface(pdev, surface_id);
     EngDeleteSurface((HSURF)surf);
 out_error1:
     return 0;

/Coolper Chen



More information about the Spice-devel mailing list