Commit 7ea64fb4 authored by Alan Coopersmith's avatar Alan Coopersmith Committed by Peter Hutterer
Browse files

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

 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's avatarAlan Coopersmith <>
Reviewed-by: Adam Jackson's avatarAdam Jackson <>
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <>
parent 6d3cf35a
......@@ -513,8 +513,13 @@ CloseWellKnownConnections(void)
int i;
for (i = 0; i < ListenTransCount; i++)
for (i = 0; i < ListenTransCount; i++) {
if (ListenTransConns[i] != NULL) {
ListenTransConns[i] = NULL;
ListenTransCount = 0;
static void
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment