diff options
author | Philippe Mathieu-Daudé <philmd@redhat.com> | 2021-04-30 17:50:09 +0200 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2021-05-02 17:24:50 +0200 |
commit | 7c06a34c8c4f2c883d6ab6b15faa214d4ebfb269 (patch) | |
tree | ccaa4e932b3b57d66b5de7eb7629ba19da55da42 /hw/input/lasips2.c | |
parent | db2dc7d8df15c5365dbe70f3cb0d5d61594a6807 (diff) |
ui: Fix memory leak in qemu_xkeymap_mapping_table()
Refactor qemu_xkeymap_mapping_table() to have a single exit point,
so we can easily free the memory allocated by XGetAtomName().
This fixes when running a binary configured with --enable-sanitizers:
Direct leak of 22 byte(s) in 1 object(s) allocated from:
#0 0x561344a7473f in malloc (qemu-system-x86_64+0x1dab73f)
#1 0x7fa4d9dc08aa in XGetAtomName (/lib64/libX11.so.6+0x2a8aa)
Fixes: 2ec78706d18 ("ui: convert GTK and SDL1 frontends to keycodemapdb")
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20210430155009.259755-1-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'hw/input/lasips2.c')
0 files changed, 0 insertions, 0 deletions