[PATCH 19/19] xfree86: only call UnInit if the driver was set.

Peter Hutterer peter.hutterer at who-t.net
Sun Sep 5 19:52:55 PDT 2010


Error path may be triggered before xf86AddInput().

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 hw/xfree86/common/xf86Xinput.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index 5b082a1..4de6c78 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -834,7 +834,7 @@ xf86NewInputDevice(InputInfoPtr pInfo, DeviceIntPtr *pdev, BOOL enable)
 
 unwind:
     if(pInfo) {
-        if(drv->UnInit)
+        if(drv && drv->UnInit)
             drv->UnInit(drv, pInfo, 0);
         else
             xf86DeleteInput(pInfo, 0);
-- 
1.7.2.2



More information about the xorg-devel mailing list