diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-06-04 12:20:17 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-06-04 12:20:17 +0100 |
commit | 782cd6eafa9917a5bdb181d66b7f4c05392950ba (patch) | |
tree | dfb706e84a92998901d77ec3074ce3ec41f99dd6 | |
parent | a99bf0125f8f166ff2d65449ecd376c99c3024b8 (diff) |
uxa: check for failure to allocate drmModeCrtc
Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/intel_display.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/intel_display.c b/src/intel_display.c index 609cbf7c..fcb3239d 100644 --- a/src/intel_display.c +++ b/src/intel_display.c @@ -680,6 +680,11 @@ intel_crtc_init(ScrnInfoPtr scrn, struct intel_mode *mode, int num) intel_crtc->mode_crtc = drmModeGetCrtc(mode->fd, mode->mode_res->crtcs[num]); + if (intel_crtc->mode_crtc == NULL) { + free(intel_crtc); + return; + } + intel_crtc->mode = mode; crtc->driver_private = intel_crtc; |