From adc0697cfcfba295a15d7a307125093cbccd637f Mon Sep 17 00:00:00 2001 From: Pauli Nieminen Date: Thu, 22 Jul 2010 15:11:27 +0300 Subject: xkb: Fix memory leak in error path map is allocated but not freed if reply length and data don't match. Signed-off-by: Pauli Nieminen Reviewed-by: Peter Hutterer --- xkb/xkb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xkb/xkb.c b/xkb/xkb.c index 935f5ea6a..a82cc38cc 100644 --- a/xkb/xkb.c +++ b/xkb/xkb.c @@ -3019,6 +3019,7 @@ register unsigned bit; to = (CARD8 *)wire; if ((to-map)!=length) { client->errorValue = _XkbErrCode2(0xff,length); + free(map); return BadLength; } } -- cgit v1.2.3