keycodes: fix valgrind warnings
==7071== Conditional jump or move depends on uninitialised value(s) ==7071== at 0x40B6CB: AddIndicatorName (keycodes.c:148) ==7071== by 0x40C34F: MergeIncludedKeycodes (keycodes.c:420) ==7071== by 0x40C613: HandleIncludeKeycodes (keycodes.c:480) ==7071== by 0x40D022: HandleKeycodesFile (keycodes.c:733) ==7071== by 0x40D79F: CompileKeycodes (keycodes.c:881) ==7071== by 0x401E22: compile_keymap (xkbcomp.c:157) ==7071== by 0x402091: xkb_map_new_from_kccgst (xkbcomp.c:229) ==7071== by 0x40216A: xkb_map_new_from_names (xkbcomp.c:254) ==7071== by 0x4046F5: test_compile_rules (common.c:164) ==7071== by 0x4015C1: test_rmlvo (rulescomp.c:44) ==7071== by 0x40180D: main (rulescomp.c:98) Signed-off-by: Ran Benita <ran234@gmail.com>master
parent
d4eee86160
commit
3c58072172
|
@ -243,12 +243,14 @@ ClearKeyNamesInfo(KeyNamesInfo * info)
|
|||
|
||||
free(info->name);
|
||||
info->name = NULL;
|
||||
info->merge = MERGE_DEFAULT;
|
||||
info->computedMax = info->explicitMax = info->explicitMin = 0;
|
||||
info->computedMin = XKB_KEYCODE_MAX;
|
||||
darray_free(info->names);
|
||||
darray_free(info->files);
|
||||
list_foreach_safe(ii, next_ii, &info->leds, entry)
|
||||
free(ii);
|
||||
list_init(&info->leds);
|
||||
list_foreach_safe(alias, next_alias, &info->aliases, entry)
|
||||
free(alias);
|
||||
list_init(&info->aliases);
|
||||
|
@ -259,6 +261,7 @@ InitKeyNamesInfo(KeyNamesInfo *info, struct xkb_keymap *keymap,
|
|||
unsigned file_id)
|
||||
{
|
||||
info->name = NULL;
|
||||
info->merge = MERGE_DEFAULT;
|
||||
list_init(&info->leds);
|
||||
list_init(&info->aliases);
|
||||
info->file_id = file_id;
|
||||
|
|
Loading…
Reference in New Issue