hw/loongarch/virt: Fix memory leak
commit54c52ec719fb8c83bbde54cb87b58688ab27c166
authorSong Gao <gaosong@loongson.cn>
Tue, 7 May 2024 02:22:39 +0000 (7 10:22 +0800)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Wed, 8 May 2024 22:07:21 +0000 (9 00:07 +0200)
tree9f0c5ed5d2a7748ff561b700ef4684d4a7315d25
parent72674db080bcdf2fd66b2a538379ee6000f5b113
hw/loongarch/virt: Fix memory leak

The char pointer 'ramName' point to a block of memory,
but never free it. Use 'g_autofree' to automatically free it.

Resolves: Coverity CID 1544773

Fixes: 0cf1478d6 ("hw/loongarch: Add numa support")
Signed-off-by: Song Gao <gaosong@loongson.cn>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20240507022239.3113987-1-gaosong@loongson.cn>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
hw/loongarch/virt.c