diff options
Diffstat (limited to 'xorg-server/xkb/XKBAlloc.c')
-rw-r--r-- | xorg-server/xkb/XKBAlloc.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/xorg-server/xkb/XKBAlloc.c b/xorg-server/xkb/XKBAlloc.c index 8c439ba0b..89ba5fb4a 100644 --- a/xorg-server/xkb/XKBAlloc.c +++ b/xorg-server/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);
+}
|