diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2011-07-19 15:52:11 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-07-19 15:52:11 +1000 |
commit | 5772c7f58f24e259349ad048de096802184c7aa1 (patch) | |
tree | f24552f1f09469b406d757828bcf3299a522d373 | |
parent | 270607ae055a21bdac44f905a791260c5b34089b (diff) |
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>
-rw-r--r-- | src/xf86Fpit.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/xf86Fpit.c b/src/xf86Fpit.c index eb85a2e..3c70b4a 100644 --- a/src/xf86Fpit.c +++ b/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); |