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>
This commit is contained in:
Pauli Nieminen 2010-07-22 15:11:27 +03:00 committed by Peter Hutterer
parent 67cfb66562
commit adc0697cfc

View File

@ -3019,6 +3019,7 @@ register unsigned bit;
to = (CARD8 *)wire;
if ((to-map)!=length) {
client->errorValue = _XkbErrCode2(0xff,length);
free(map);
return BadLength;
}
}