diff options
author | Alan Coopersmith <alan.coopersmith@sun.com> | 2009-12-11 00:46:22 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@sun.com> | 2009-12-18 16:51:45 -0800 |
commit | eb750f8b5e14751d4c40b50499baec5d2ba79db9 (patch) | |
tree | 48791902f8ebe6f6422787285accb13d44e25b8a /hw/xfree86/dri | |
parent | 1df4bd6011e110dcf0649b15bfffd4ab9e6961d6 (diff) |
Check for failures from CreateNewResourceType
Make sure to check return value before setting bitmask flags.
For most calls, just fails to init the extension. Since Xinput
already calls FatalError() on initialization failure, so does
failure to allocate Xinput's resource type.
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'hw/xfree86/dri')
-rw-r--r-- | hw/xfree86/dri/dri.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c index 0de9be621..1a6cb4d83 100644 --- a/hw/xfree86/dri/dri.c +++ b/hw/xfree86/dri/dri.c @@ -792,6 +792,9 @@ DRIExtensionInit(void) DRIDrawablePrivResType = CreateNewResourceType(DRIDrawablePrivDelete); DRIContextPrivResType = CreateNewResourceType(DRIContextPrivDelete); + if (!DRIDrawablePrivResType || !DRIContextPrivResType) + return FALSE; + RegisterBlockAndWakeupHandlers(DRIBlockHandler, DRIWakeupHandler, NULL); return TRUE; |