Patchwork qxl: save qemu_create_displaysurface_from result

login
register
mail settings
Submitter Gerd Hoffmann
Date Dec. 10, 2012, 11:01 a.m.
Message ID <1355137319-7572-1-git-send-email-kraxel@redhat.com>
Download mbox | patch
Permalink /patch/204852/
State New
Headers show

Comments

Gerd Hoffmann - Dec. 10, 2012, 11:01 a.m.
https://bugzilla.redhat.com/show_bug.cgi?id=885644

Reported-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/qxl-render.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)
Markus Armbruster - Dec. 14, 2012, 3:12 p.m.
Gerd Hoffmann <kraxel@redhat.com> writes:

> https://bugzilla.redhat.com/show_bug.cgi?id=885644
>
> Reported-by: Markus Armbruster <armbru@redhat.com>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>

Spotted by Coverity.

Impact of the bug unknown; would be nice to have in the commit message.

Reviewed-by: Markus Armbruster <armbru@redhat.com>

Patch

diff --git a/hw/qxl-render.c b/hw/qxl-render.c
index 98ecb21..88e63f8 100644
--- a/hw/qxl-render.c
+++ b/hw/qxl-render.c
@@ -113,11 +113,12 @@  static void qxl_render_update_area_unlocked(PCIQXLDevice *qxl)
                qxl->guest_primary.bits_pp);
         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,