diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2009-07-07 18:05:01 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2009-07-07 18:17:57 +0100 |
commit | c889b34e432198d5410a068eff3089ff5314ac27 (patch) | |
tree | 10a1ae9477ce7bb55d1f6f7a81e032d27c7ba338 | |
parent | 705042f497b7b3843c2dcc5c160fb8dfeac1472a (diff) |
Check for a valid I830Ptr before closing master.
After failing to become DRM master, the X server dies attempting to close
the master fd during free:
(EE) intel(0): [drm] failed to set drm interface version.
(EE) intel(0): Failed to become DRM master.
(EE) intel(0): failed to get resources: Bad file descriptor
(EE) intel(0): Kernel modesetting setup failed
Backtrace:
0: X(xorg_backtrace+0x3b) [0x8133a3b]
1: X(xf86SigHandler+0x55) [0x80c7945]
2: [0xb805d400]
3: /usr/lib/xorg/modules/drivers//intel_drv.so [0xb7b4bfcc]
4: X(xf86DeleteScreen+0x6b) [0x80d465b]
5: X(InitOutput+0x548) [0x80b0158]
6: X(main+0x1cb) [0x807220b]
7: /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5) [0xb7d107a5]
8: X [0x8071881]
Saw signal 11. Server aborting.
ddxSigGiveUp: Closing log
ddxSigGiveUp: re-raising 11
Segmentation fault
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/i830_driver.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/i830_driver.c b/src/i830_driver.c index c125a73e..d1acaa56 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -1482,7 +1482,7 @@ static void i830_close_drm_master(ScrnInfoPtr scrn) { I830Ptr i830 = I830PTR(scrn); - if (i830->drmSubFD > 0) { + if (i830 && i830->drmSubFD > 0) { drmClose(i830->drmSubFD); i830->drmSubFD = -1; } |