* [PATCH] qemu-keymap: fix a small leak
@ 2024-10-01 15:27 marcandre.lureau
2024-10-01 15:31 ` Peter Maydell
0 siblings, 1 reply; 2+ messages in thread
From: marcandre.lureau @ 2024-10-01 15:27 UTC (permalink / raw)
To: qemu-devel; +Cc: kraxel, Marc-André Lureau
From: Marc-André Lureau <marcandre.lureau@redhat.com>
Spotted thanks to ASAN:
Direct leak of 136 byte(s) in 1 object(s) allocated from:
#0 0x7fd0216f7350 in calloc (/lib64/libasan.so.8+0xf7350) (BuildId: a4ad7eb954b390cf00f07fa10952988a41d9fc7a)
#1 0x7fd0215d5d5c in xkb_state_new (/lib64/libxkbcommon.so.0+0x1cd5c) (BuildId: 5e4eb795acbf75d373f2930e5d0e84a568225bab)
#2 0x5593b05bbb5d in main ../qemu-keymap.c:235
SUMMARY: AddressSanitizer: 136 byte(s) leaked in 1 allocation(s).
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
qemu-keymap.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/qemu-keymap.c b/qemu-keymap.c
index 701e4332af..603bab4661 100644
--- a/qemu-keymap.c
+++ b/qemu-keymap.c
@@ -261,5 +261,6 @@ int main(int argc, char *argv[])
"\n"
"# quirks section end\n");
+ xkb_state_unref(state);
exit(0);
}
--
2.45.2.827.g557ae147e6
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] qemu-keymap: fix a small leak
2024-10-01 15:27 [PATCH] qemu-keymap: fix a small leak marcandre.lureau
@ 2024-10-01 15:31 ` Peter Maydell
0 siblings, 0 replies; 2+ messages in thread
From: Peter Maydell @ 2024-10-01 15:31 UTC (permalink / raw)
To: marcandre.lureau; +Cc: qemu-devel, kraxel
On Tue, 1 Oct 2024 at 16:28, <marcandre.lureau@redhat.com> wrote:
>
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> Spotted thanks to ASAN:
> Direct leak of 136 byte(s) in 1 object(s) allocated from:
> #0 0x7fd0216f7350 in calloc (/lib64/libasan.so.8+0xf7350) (BuildId: a4ad7eb954b390cf00f07fa10952988a41d9fc7a)
> #1 0x7fd0215d5d5c in xkb_state_new (/lib64/libxkbcommon.so.0+0x1cd5c) (BuildId: 5e4eb795acbf75d373f2930e5d0e84a568225bab)
> #2 0x5593b05bbb5d in main ../qemu-keymap.c:235
>
> SUMMARY: AddressSanitizer: 136 byte(s) leaked in 1 allocation(s).
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> qemu-keymap.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/qemu-keymap.c b/qemu-keymap.c
> index 701e4332af..603bab4661 100644
> --- a/qemu-keymap.c
> +++ b/qemu-keymap.c
> @@ -261,5 +261,6 @@ int main(int argc, char *argv[])
> "\n"
> "# quirks section end\n");
>
> + xkb_state_unref(state);
> exit(0);
> }
https://lore.kernel.org/qemu-devel/20240723-unref-v1-1-88606ffd4552@daynix.com/
from July is similar but seems to free slightly more xkb
data structures.
-- PMM
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-10-01 15:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-01 15:27 [PATCH] qemu-keymap: fix a small leak marcandre.lureau
2024-10-01 15:31 ` Peter Maydell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).