summarylogtreecommitdiffstats
path: root/assign-local-private-after-allocating.patch
blob: e3e635a6f384fab2cb3e6c5b1977b3fe9515e33b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From ec2c4ead497133ef20d5ef5a9b481b38e1e0f7a2 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon, 27 Jun 2011 03:13:54 +0000
Subject: Assign local->private after allocating.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
---
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;
 
--
cgit v0.8.3-6-g21f6