diff options
Diffstat (limited to 'xkb/XKBMAlloc.c')
-rw-r--r-- | xkb/XKBMAlloc.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/xkb/XKBMAlloc.c b/xkb/XKBMAlloc.c index 197523f57..6b186c1ad 100644 --- a/xkb/XKBMAlloc.c +++ b/xkb/XKBMAlloc.c @@ -221,18 +221,12 @@ XkbCopyKeyType(XkbKeyTypePtr from,XkbKeyTypePtr into) { if ((!from)||(!into)) return BadMatch; - if (into->map) { - free(into->map); - into->map= NULL; - } - if (into->preserve) { - free(into->preserve); - into->preserve= NULL; - } - if (into->level_names) { - free(into->level_names); - into->level_names= NULL; - } + free(into->map); + into->map = NULL; + free(into->preserve); + into->preserve = NULL; + free(into->level_names); + into->level_names = NULL; *into= *from; if ((from->map)&&(into->map_count>0)) { into->map= calloc(into->map_count, sizeof(XkbKTMapEntryRec)); |