File: 0070-Destroy-frame-queue-before-display.patch

package info (click to toggle)
qtwayland-opensource-src 5.15.17-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 11,108 kB
  • sloc: cpp: 53,691; xml: 9,462; ansic: 187; makefile: 29; sh: 5
file content (33 lines) | stat: -rw-r--r-- 1,091 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From 24be5552594b583ab78a469c6735ac288178507f Mon Sep 17 00:00:00 2001
From: David Redondo <qt@david-redondo.de>
Date: Tue, 11 Apr 2023 14:27:27 +0200
Subject: [PATCH] Destroy frame queue before display

wl_event_queue_destroy accesses the display.
Found by running a test under valgrind.

Pick-to: 6.5
Change-Id: Ic89cbd3b6e98b4fc9561b0e63b5fab4886a1ec50
Reviewed-by: David Edmundson <davidedmundson@kde.org>
(cherry picked from commit a76bf824fcd1cc3789f0d3454a0423c0241d9718)
---
 src/client/qwaylanddisplay.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/src/client/qwaylanddisplay.cpp
+++ b/src/client/qwaylanddisplay.cpp
@@ -379,11 +379,12 @@ QWaylandDisplay::~QWaylandDisplay(void)
 #if QT_CONFIG(cursor)
     qDeleteAll(mCursorThemes);
 #endif
-    if (mDisplay)
-        wl_display_disconnect(mDisplay);
 
     if (m_frameEventQueue)
         wl_event_queue_destroy(m_frameEventQueue);
+
+    if (mDisplay)
+        wl_display_disconnect(mDisplay);
 }
 
 // Steps which is called just after constructor. This separates registry_global() out of the constructor