[PATCH acecad] Assign local->private after allocating.

Peter Hutterer peter.hutterer at who-t.net
Sun Jun 26 20:19:41 PDT 2011


It is detrimental to the user experience when the driver tries to derefernce
null pointers.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 src/acecad.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/acecad.c b/src/acecad.c
index ad6d793..604fe91 100644
--- a/src/acecad.c
+++ b/src/acecad.c
@@ -343,6 +343,7 @@ AceCadPreInit(InputDriverPtr drv, InputInfoPtr local, int flags)
         return BadAlloc;
 
     memset(priv, 0, sizeof(AceCadPrivateRec));
+    local->private = priv;
 
     local->device_control = DeviceControl;
 
-- 
1.7.5.4



More information about the xorg-devel mailing list