[PATCH 1/1] Initialize pci_dev

Pascal Terjan pterjan at google.com
Thu Jan 21 16:26:22 PST 2016


Else it is read before initialization if XSERVER_LIBPCIACCESS is not defined
or location.type is not BUS_PCI.

Noticed when I got a segfault where it was 0x1 while doing some tests on arm.

Signed-off-by: Pascal Terjan <pterjan at google.com>
---
 src/fbdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/fbdev.c b/src/fbdev.c
index dcfed28..2c658fe 100644
--- a/src/fbdev.c
+++ b/src/fbdev.c
@@ -427,7 +427,7 @@ FBDevPreInit(ScrnInfoPtr pScrn, int flags)
 	int default_depth, fbbpp;
 	const char *s;
 	int type;
-	void *pci_dev;
+	void *pci_dev = NULL;
 
 	if (flags & PROBE_DETECT) return FALSE;
 
-- 
2.7.0.rc3.207.g0ac5344



More information about the xorg-devel mailing list