summaryrefslogtreecommitdiff
path: root/xkb
diff options
context:
space:
mode:
authorPauli Nieminen <ext-pauli.nieminen@nokia.com>2010-07-22 15:11:27 +0300
committerPeter Hutterer <peter.hutterer@who-t.net>2010-09-01 14:43:00 +1000
commitadc0697cfcfba295a15d7a307125093cbccd637f (patch)
tree15f8fd6e658b8aa64cf479f6da338674137816b3 /xkb
parent67cfb66562cd9d39f30fec6fbc38eb1eb5e5b030 (diff)
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 <ext-pauli.nieminen@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'xkb')
-rw-r--r--xkb/xkb.c1
1 files changed, 1 insertions, 0 deletions
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;
}
}