|
|
337bb7 |
From cf2254c13497049a8dbc73a3b031f4cd43403ab1 Mon Sep 17 00:00:00 2001
|
|
|
337bb7 |
From: Victor Toso <me@victortoso.com>
|
|
|
337bb7 |
Date: Tue, 23 Oct 2018 13:48:58 +0200
|
|
|
337bb7 |
Subject: [PATCH] qxl: Initialize prev field while dup surface list
|
|
|
337bb7 |
MIME-Version: 1.0
|
|
|
337bb7 |
Content-Type: text/plain; charset=UTF-8
|
|
|
337bb7 |
Content-Transfer-Encoding: 8bit
|
|
|
337bb7 |
|
|
|
337bb7 |
Otherwise we will can hit a segfault qxl_surface_kill()
|
|
|
337bb7 |
|
|
|
337bb7 |
│717 void
|
|
|
337bb7 |
│718 qxl_surface_kill (qxl_surface_t *surface)
|
|
|
337bb7 |
│719 {
|
|
|
337bb7 |
│720 struct evacuated_surface_t *ev = surface->evacuated;
|
|
|
337bb7 |
│721
|
|
|
337bb7 |
│722 if (ev)
|
|
|
337bb7 |
│723 {
|
|
|
337bb7 |
│724 /* server side surface is already destroyed (via reset), don't
|
|
|
337bb7 |
│725 * resend a destroy. Just mark surface as not to be recreated */
|
|
|
337bb7 |
│726 ev->pixmap = NULL;│
|
|
|
337bb7 |
│727 if (ev->image)│
|
|
|
337bb7 |
│728 pixman_image_unref (ev->image);
|
|
|
337bb7 |
│729 if (ev->next)
|
|
|
337bb7 |
│730 ev->next->prev = ev->prev;
|
|
|
337bb7 |
│731 if (ev->prev)
|
|
|
337bb7 |
>│732 ev->prev->next = ev->next;
|
|
|
337bb7 |
│733 free(ev);
|
|
|
337bb7 |
│734 surface->evacuated = NULL;
|
|
|
337bb7 |
│735 return;
|
|
|
337bb7 |
│736 }
|
|
|
337bb7 |
|
|
|
337bb7 |
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1641793
|
|
|
337bb7 |
|
|
|
337bb7 |
Signed-off-by: Victor Toso <victortoso@redhat.com>
|
|
|
337bb7 |
---
|
|
|
337bb7 |
src/qxl_surface_ums.c | 1 +
|
|
|
337bb7 |
1 file changed, 1 insertion(+)
|
|
|
337bb7 |
|
|
|
337bb7 |
diff --git a/src/qxl_surface_ums.c b/src/qxl_surface_ums.c
|
|
|
337bb7 |
index 2c16ede..19cbd36 100644
|
|
|
337bb7 |
--- a/src/qxl_surface_ums.c
|
|
|
337bb7 |
+++ b/src/qxl_surface_ums.c
|
|
|
337bb7 |
@@ -792,6 +792,7 @@ qxl_surface_cache_evacuate_all (surface_cache_t *cache)
|
|
|
337bb7 |
|
|
|
337bb7 |
unlink_surface (s);
|
|
|
337bb7 |
|
|
|
337bb7 |
+ evacuated->prev = NULL;
|
|
|
337bb7 |
evacuated->next = evacuated_surfaces;
|
|
|
337bb7 |
if (evacuated_surfaces)
|
|
|
337bb7 |
evacuated_surfaces->prev = evacuated;
|
|
|
337bb7 |
--
|
|
|
337bb7 |
2.19.2
|
|
|
337bb7 |
|