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:
parent
67cfb66562
commit
adc0697cfc
|
@ -3019,6 +3019,7 @@ register unsigned bit;
|
||||||
to = (CARD8 *)wire;
|
to = (CARD8 *)wire;
|
||||||
if ((to-map)!=length) {
|
if ((to-map)!=length) {
|
||||||
client->errorValue = _XkbErrCode2(0xff,length);
|
client->errorValue = _XkbErrCode2(0xff,length);
|
||||||
|
free(map);
|
||||||
return BadLength;
|
return BadLength;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user