Subject: [PATCH 2/2] qxl: save qemu_create_displaysurface_from result

From: Gerd Hoffmann <[email-masked]>
Date: Thu, 3 Jan 2013 10:42:58 +0100

RH-Author: Gerd Hoffmann <[email-masked]>
Message-id: <[email-masked]>
Patchwork-id: 45557
O-Subject: [RHEL-6.4 qemu-kvm PATCH] qxl: save qemu_create_displaysurface_from result
Bugzilla: 885644
RH-Acked-by: Laszlo Ersek <[email-masked]>
RH-Acked-by: Markus Armbruster <[email-masked]>
RH-Acked-by: Michal Novotny <[email-masked]>

Spotted by Coverity.

https://bugzilla.redhat.com/show_bug.cgi?id=885644

Cc: [email-masked]
Reported-by: Markus Armbruster <[email-masked]>
Signed-off-by: Gerd Hoffmann <[email-masked]>
(cherry picked from commit 2f464b5a32b414adb545acc6d94b5c35c7d258ba)
---
 hw/qxl-render.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

Signed-off-by: Miroslav Rezanina <[email-masked]>
---
 hw/qxl-render.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/hw/qxl-render.c b/hw/qxl-render.c
index b6f77f1..c119a2a 100644
--- a/hw/qxl-render.c
+++ b/hw/qxl-render.c
@@ -119,11 +119,12 @@ static void qxl_render_update_area_unlocked(PCIQXLDevice *qxl)
         surface->height != qxl->guest_primary.surface.height) {
         if (qxl->guest_primary.qxl_stride > 0) {
             qemu_free_displaysurface(vga->ds);
-            qemu_create_displaysurface_from(qxl->guest_primary.surface.width,
-                                            qxl->guest_primary.surface.height,
-                                            qxl->guest_primary.bits_pp,
-                                            qxl->guest_primary.abs_stride,
-                                            qxl->guest_primary.data);
+            vga->ds->surface = qemu_create_displaysurface_from
+                (qxl->guest_primary.surface.width,
+                 qxl->guest_primary.surface.height,
+                 qxl->guest_primary.bits_pp,
+                 qxl->guest_primary.abs_stride,
+                 qxl->guest_primary.data);
         } else {
             qemu_resize_displaysurface(vga->ds,
                     qxl->guest_primary.surface.width,
-- 
1.7.1