[Spice-devel] [PATCH] Fix a memory leak in qxl_screen_init

Christophe Fergeau cfergeau at redhat.com
Fri Apr 4 01:34:35 PDT 2014


From: Longguang Yue <bigclouds at 163.com>

qxl->uxa was allocated twice, once in qxl_screen_init() and once in
qxl_uxa_init(). This commit removes the redundant allocation in
qxl_screen_init().
---

Here is a this same patch in git-format-patch format and with a whitespace
change removed. ACK from me for the patch. Longguang, let me know if your name/email
and the commit log are fine with you before this gets pushed.

Christophe

 src/qxl_driver.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/qxl_driver.c b/src/qxl_driver.c
index 29b1551..aa969e8 100644
--- a/src/qxl_driver.c
+++ b/src/qxl_driver.c
@@ -749,8 +749,6 @@ qxl_screen_init (SCREEN_INIT_ARGS_DECL)
 	}
     }
     
-    qxl->uxa = uxa_driver_alloc ();
-    
 #ifndef XSPICE
     qxl->io_pages = (void *)((unsigned long)qxl->ram);
     qxl->io_pages_physical = (void *)((unsigned long)qxl->ram_physical);
-- 
1.9.0



More information about the Spice-devel mailing list