diff options
| author | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-01-03 18:09:56 +1030 |
|---|---|---|
| committer | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-01-03 18:09:56 +1030 |
| commit | c7e9b67c547c97b2c943eab555b4fe2844e8a91f (patch) | |
| tree | aa220fa282cc8d1d972937a6a07be5da13fc6fa7 | |
| parent | 8da83836b60f7cdb75d08482f4311fa0e2ab4e1d (diff) | |
dix: free ClassesRec when a BadAlloc occurs during CoreKeyboardProc.
| -rw-r--r-- | dix/devices.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/dix/devices.c b/dix/devices.c index ed69cb869..f1a75957a 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -415,12 +415,14 @@ CoreKeyboardProc(DeviceIntPtr pDev, int what) keySyms.mapWidth); if (!keySyms.map) { ErrorF("[dix] Couldn't allocate core keymap\n"); + xfree(classes); return BadAlloc; } modMap = (CARD8 *)xalloc(MAP_LENGTH); if (!modMap) { ErrorF("[dix] Couldn't allocate core modifier map\n"); + xfree(classes); return BadAlloc; } bzero((char *)modMap, MAP_LENGTH); |
