]> git.proxmox.com Git - mirror_qemu.git/commit
hw/nvme: fix memory leak in fdp ruhid parsing
authorKlaus Jensen <k.jensen@samsung.com>
Tue, 11 Apr 2023 18:34:11 +0000 (20:34 +0200)
committerKlaus Jensen <k.jensen@samsung.com>
Wed, 12 Apr 2023 10:03:02 +0000 (12:03 +0200)
commitcb16e5c76f4e719e6d0f9fd2cb6cfe6e6c17fed9
tree942d1250c1b7ac7c996e663a239332155ef8f4e1
parent6c50845a9183610cfd4cfffd48dfc704cd340882
hw/nvme: fix memory leak in fdp ruhid parsing

Coverity reports a memory leak of memory when parsing ruhids at
namespace initialization. Since this is just working memory, not needed
beyond the scope of the functions, fix this by adding a g_autofree
annotation.

Reported-by: Coverity (CID 1507979)
Fixes: 73064edfb864 ("hw/nvme: flexible data placement emulation")
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
hw/nvme/ns.c