Note that those drivers are barely maintained and might disappear in the futur PR: 216272 Submitted by: matthew@reztek.cz
26 lines
809 B
Text
26 lines
809 B
Text
From 5772c7f58f24e259349ad048de096802184c7aa1 Mon Sep 17 00:00:00 2001
|
|
From: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Date: Tue, 19 Jul 2011 15:52:11 +1000
|
|
Subject: Check for priv before dereferencing it.
|
|
|
|
We can hit this path when the priv alloc fails.
|
|
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
diff --git a/src/xf86Fpit.c b/src/xf86Fpit.c
|
|
index eb85a2e..3c70b4a 100644
|
|
--- src/xf86Fpit.c
|
|
+++ src/xf86Fpit.c
|
|
@@ -542,7 +542,8 @@ static int xf86FpitAllocate(InputDriverPtr drv, InputInfoPtr pInfo)
|
|
static void xf86FpitUninit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
|
|
{
|
|
FpitPrivatePtr priv = (FpitPrivatePtr) pInfo->private;
|
|
- free(priv->fpitDev);
|
|
+ if (priv)
|
|
+ free(priv->fpitDev);
|
|
free(priv);
|
|
pInfo->private = NULL;
|
|
xf86DeleteInput(pInfo, 0);
|
|
--
|
|
cgit v0.10.2
|
|
|