summaryrefslogtreecommitdiff
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-27 09:40:55 +0200
commiteecf91150d4c17fe73913fd6c24064c0394fb40e (patch)
tree878206a91e0f853345d16ee02cef69a4d9535737
parentb912c08ffa09ec9d7c55db7df1df622dd4b6ab64 (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> (cherry picked from commit adc0697cfcfba295a15d7a307125093cbccd637f)
-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;
}
}