[Spice-devel] [PATCH qxl-win v3 7/8] display/surface: CreateDeviceBitmap: remove redundant FreeSurface
Alon Levy
alevy at redhat.com
Mon Jun 20 06:08:27 PDT 2011
on error2 path, if we failed QXLGetSurface, we free the surface info but then
the caller (DrvCreateDeviceBitmap) frees it again. In addition, we cannot free
the SurfaceInfo since it is the handle given to GDI and is accessed on callback
from EngDestroySurface (which is called immediatelly after in the same error
path).
---
display/surface.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/display/surface.c b/display/surface.c
index d6e1be3..0a93abf 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;
--
1.7.5.4
More information about the Spice-devel
mailing list