[PATCH] dix: plug memory leak in freeing TouchClass

Peter Hutterer peter.hutterer at who-t.net
Mon Apr 22 23:04:06 PDT 2013


==15562== 1,800 bytes in 1 blocks are definitely lost in loss record 298 of 330
==15562==    at 0x4A06B6F: calloc (vg_replace_malloc.c:593)
==15562==    by 0x4312C7: InitTouchClassDeviceStruct (devices.c:1644)

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 dix/devices.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dix/devices.c b/dix/devices.c
index be236dd..85961a0 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -795,6 +795,7 @@ FreeDeviceClass(int type, pointer *class)
             free((*t)->touches[i].valuators);
         }
 
+        free((*t)->touches);
         free((*t));
         break;
     }
-- 
1.8.1.4



More information about the xorg-devel mailing list