[PATCH vmmouse] Free the vmmouse data on UnInit

Peter Hutterer peter.hutterer at who-t.net
Thu Jan 31 17:52:53 PST 2013


xf86DeleteInput() will free pInfo->private, but not the one hanging off
that.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
Tested-by: Zack Rusin <zackr at vmware.com>
---
Zack, feel free to push this.

 src/vmmouse.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/vmmouse.c b/src/vmmouse.c
index bb450ff..cac8306 100644
--- a/src/vmmouse.c
+++ b/src/vmmouse.c
@@ -807,7 +807,14 @@ MouseCommonOptions(InputInfoPtr pInfo)
 static void
 VMMouseUnInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
 {
+   MouseDevPtr pMse = pInfo->private;
+   VMMousePrivPtr mPriv = (VMMousePrivPtr)pMse->mousePriv;
+
    xf86Msg(X_INFO, "VMWARE(0): VMMouseUnInit\n");
+
+   free(mPriv);
+
+   xf86DeleteInput(pInfo, flags);
 }
 
 
-- 
1.8.1



More information about the xorg-devel mailing list