hw/mips/boston: Fix memory leak in boston_fdt_filter() error-handling paths
commitbf4ee88ab63fcf2dcb75f0d68cc6c8d2edb68212
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 6 Nov 2020 17:58:23 +0000 (6 17:58 +0000)
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>
Sun, 8 Nov 2020 23:40:44 +0000 (9 00:40 +0100)
treed06a2bedb0528dbb144c7ab1ab8bca14723b4a04
parentd40b55bc1b8630a0028f54d9df376930e133cc4a
hw/mips/boston: Fix memory leak in boston_fdt_filter() error-handling paths

Coverity points out that the error-handling paths in the
boston_fdt_filter() function don't free the fdt that was allocated.
Fix the leak by using g_autofree.

Fixes: Coverity CID 1432275

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20201106175823.1650-1-peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
hw/mips/boston.c