qemu-keymap: Release local allocation references
authorAkihiko Odaki <akihiko.odaki@daynix.com>
Tue, 23 Jul 2024 08:49:26 +0000 (17:49 +0900)
committerMichael Tokarev <mjt@tls.msk.ru>
Thu, 3 Oct 2024 14:26:05 +0000 (17:26 +0300)
commitfa9ddb1caf98464f82d43397c7bc78baed5c43ee
tree39fba115d7d320a29dea40e5e5b66695d903cf63
parent7bd9b0b41df67680ee20437c4c8f857c847235bf
qemu-keymap: Release local allocation references

Commit 2523baf7fb4d ("qemu-keymap: Make references to allocations
static") made references to allocations static to ensure LeakSanitizer
can track them. This trick unfortunately did not work with gcc version
14.0.1; that compiler is clever enough to know that the value of the
"state" variable is only referred in the current execution of the
function and to put it on the stack.

Release references to allocations and suppress the error once for all.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
qemu-keymap.c