[PATCH v2 evdev 2/3] Release leaked device identifier on input device disconnect.

Rami Ylimäki rami.ylimaki at vincit.fi
Tue Mar 8 01:23:46 PST 2011


Signed-off-by: Rami Ylimäki <rami.ylimaki at vincit.fi>
Reviewed-by: Erkki Seppälä <erkki.seppala at vincit.fi>
---
 src/evdev.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/evdev.c b/src/evdev.c
index 18b7246..db62375 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -2170,6 +2170,9 @@ EvdevUnInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
     {
         /* Release strings allocated in EvdevAddKeyClass. */
         XkbFreeRMLVOSet(&pEvdev->rmlvo, FALSE);
+        /* Release string allocated in EvdevOpenDevice. */
+        free((void *)pEvdev->device); /* (const char *) */
+        pEvdev->device = NULL;
     }
     xf86DeleteInput(pInfo, flags);
 }
-- 
1.6.3.3



More information about the xorg-devel mailing list