diff options
Diffstat (limited to 'xkb/XKBAlloc.c')
-rw-r--r-- | xkb/XKBAlloc.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/xkb/XKBAlloc.c b/xkb/XKBAlloc.c index bffd60fce..b70ac1705 100644 --- a/xkb/XKBAlloc.c +++ b/xkb/XKBAlloc.c @@ -333,3 +333,22 @@ XkbFreeKeyboard(XkbDescPtr xkb,unsigned which,Bool freeAll) free(xkb); return; } + + +/***====================================================================***/ + +void +XkbFreeComponentNames(XkbComponentNamesPtr names, Bool freeNames) +{ + if (names) + { + free(names->keycodes); + free(names->types); + free(names->compat); + free(names->symbols); + free(names->geometry); + memset(names, 0, sizeof(XkbComponentNamesRec)); + } + if (freeNames) + free(names); +} |