When -displayfd is looping through the possible display ids to use, if it can't open all the listening sockets for one (say when :0 is already in use), it calls CloseWellKnownConnections to close all the ListenTransConns entries before the point that ListenTransFds was allocated & initialized, so CloseWellKnownConnections would segfault trying to read entries from a NULL ListenTransFds pointer.
Introduced by commit 7b02f0b8 Signed-off-by: Alan Coopersmith <[email protected]> --- os/connection.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/os/connection.c b/os/connection.c index 8d866f6..492d79f 100644 --- a/os/connection.c +++ b/os/connection.c @@ -522,7 +522,8 @@ CloseWellKnownConnections(void) if (ListenTransConns[i] != NULL) { _XSERVTransClose(ListenTransConns[i]); ListenTransConns[i] = NULL; - RemoveNotifyFd(ListenTransFds[i]); + if (ListenTransFds != NULL) + RemoveNotifyFd(ListenTransFds[i]); } } ListenTransCount = 0; -- 2.6.1 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
