aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/evdev.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/evdev.c b/src/evdev.c
index 5667dc1..baa7ac1 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -2461,13 +2461,20 @@ EvdevUnInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
xf86DeleteInput(pInfo, flags);
}
+static EvdevPtr
+EvdevAlloc(void)
+{
+ EvdevPtr pEvdev = calloc(sizeof(EvdevRec), 1);
+ return pEvdev;
+}
+
static int
EvdevPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
{
EvdevPtr pEvdev;
int rc = BadAlloc;
- if (!(pEvdev = calloc(sizeof(EvdevRec), 1)))
+ if (!(pEvdev = EvdevAlloc()))
goto error;
pInfo->private = pEvdev;