mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-07 12:30:17 +01:00
Clear ListenTransConns entries in CloseWellKnownConnections
Since _XSERVTransClose frees the connection pointer passed to it,
remove that pointer from the array, so we don't try to double free it
if we come back into CloseWellKnownConnections again.
Should fix https://bugzilla.yoctoproject.org/show_bug.cgi?id=6665 in which
the shutdown section of the main() loop called CloseWellKnownConnections()
and then moved on to ddxGiveUp(), which failed to release the VT and thus
called AbortServer(), which called CloseWellKnownConnections() again.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 7ea64fb437)
This commit is contained in:
parent
a4132357c2
commit
19da4355ee
1 changed files with 7 additions and 2 deletions
|
|
@ -519,8 +519,13 @@ CloseWellKnownConnections(void)
|
|||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ListenTransCount; i++)
|
||||
_XSERVTransClose(ListenTransConns[i]);
|
||||
for (i = 0; i < ListenTransCount; i++) {
|
||||
if (ListenTransConns[i] != NULL) {
|
||||
_XSERVTransClose(ListenTransConns[i]);
|
||||
ListenTransConns[i] = NULL;
|
||||
}
|
||||
}
|
||||
ListenTransCount = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue