summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/xorg-xserver/xserver-xorg/xtrans.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-graphics/xorg-xserver/xserver-xorg/xtrans.patch')
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xorg/xtrans.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/xtrans.patch b/meta/recipes-graphics/xorg-xserver/xserver-xorg/xtrans.patch
new file mode 100644
index 0000000000..e6dba04919
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg/xtrans.patch
@@ -0,0 +1,38 @@
1Upstream-Status: Submitted
2Signed-off-by: Ross Burton <ross.burton@intel.com>
3
4Since _XSERVTransClose frees the connection pointer passed to it,
5remove that pointer from the array, so we don't try to double free it
6if we come back into CloseWellKnownConnections again.
7
8Should fix https://bugzilla.yoctoproject.org/show_bug.cgi?id=6665 in which
9the shutdown section of the main() loop called CloseWellKnownConnections()
10and then moved on to ddxGiveUp(), which failed to release the VT and thus
11called AbortServer(), which called CloseWellKnownConnections() again.
12
13Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
14Reviewed-by: Adam Jackson <ajax@redhat.com>
15---
16 os/connection.c | 9 +++++++--
17 1 file changed, 7 insertions(+), 2 deletions(-)
18
19diff --git a/os/connection.c b/os/connection.c
20index ddfe50a..7ff44e1 100644
21--- a/os/connection.c
22+++ b/os/connection.c
23@@ -513,8 +513,13 @@ CloseWellKnownConnections(void)
24 {
25 int i;
26
27- for (i = 0; i < ListenTransCount; i++)
28- _XSERVTransClose(ListenTransConns[i]);
29+ for (i = 0; i < ListenTransCount; i++) {
30+ if (ListenTransConns[i] != NULL) {
31+ _XSERVTransClose(ListenTransConns[i]);
32+ ListenTransConns[i] = NULL;
33+ }
34+ }
35+ ListenTransCount = 0;
36 }
37
38 static void