This data is later freed when the xserver calls UnInit() for the device.
Freeing too early means we segfault later when trying to dereference
null-pointers.

Signed-off-by: Peter Hutterer <[email protected]>
---
 src/wcmConfig.c |   11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/src/wcmConfig.c b/src/wcmConfig.c
index d660088..2694306 100644
--- a/src/wcmConfig.c
+++ b/src/wcmConfig.c
@@ -550,15 +550,10 @@ SetupProc_fail:
        if (common && priv)
                common->wcmDevices = priv->next;
 
-       if (pInfo)
+       if (pInfo && pInfo->fd != -1)
        {
-               if (pInfo->fd != -1)
-               {
-                       close(pInfo->fd);
-                       pInfo->fd = -1;
-               }
-
-               wcmFree(pInfo);
+               close(pInfo->fd);
+               pInfo->fd = -1;
        }
 
        return BadMatch;
-- 
1.7.3.3

------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to