diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2010-12-08 16:07:13 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-07-18 15:14:20 +1000 |
commit | ed3387c4defc0e7a1043b99029f004ce08a53dbb (patch) | |
tree | 32ddddd6d4135cd1db32d104e0d8658b1dbb90d6 | |
parent | 12c7ac3ac13e1b0204b58e3791611dc263c7ac90 (diff) | |
download | xf86-input-wacom-ed3387c4defc0e7a1043b99029f004ce08a53dbb.tar.gz |
Don't free the device info on a failed PreInit.
This data is later freed when the xserver calls UnInit().
Freeing too early means we segfault later when trying to dereference
null-pointers.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 799bbf2cf9cd54942c66f9117df319e933bbd10b)
Conflicts:
src/wcmConfig.c
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | src/wcmConfig.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/wcmConfig.c b/src/wcmConfig.c index 3c183f0..f8aac5a 100644 --- a/src/wcmConfig.c +++ b/src/wcmConfig.c @@ -444,17 +444,11 @@ SetupProc_fail: /* restart the device list from the next one */ if (common && priv) common->wcmDevices = priv->next; - free(common); - free(priv); - if (pInfo) - { - if (pInfo->fd != -1) - { - close(pInfo->fd); - pInfo->fd = -1; - } - pInfo->private = NULL; + if (pInfo && pInfo->fd != -1) + { + close(pInfo->fd); + pInfo->fd = -1; } return BadMatch; |