From 3ad9fd5a257794d516db515c217c78a5806112fe Mon Sep 17 00:00:00 2001 From: Gonglei Date: Tue, 28 Apr 2015 17:11:02 +0800 Subject: target-mips: fix memory leak Coveristy reports that variable prom_buf/params_buf going out of scope leaks the storage it points to. Cc: Aurelien Jarno Cc: Leon Alrae Signed-off-by: Gonglei Reviewed-by: Leon Alrae Signed-off-by: Michael Tokarev --- hw/mips/mips_r4k.c | 1 + 1 file changed, 1 insertion(+) (limited to 'hw/mips/mips_r4k.c') diff --git a/hw/mips/mips_r4k.c b/hw/mips/mips_r4k.c index 66e2a58e86..f4dcacd862 100644 --- a/hw/mips/mips_r4k.c +++ b/hw/mips/mips_r4k.c @@ -139,6 +139,7 @@ static int64_t load_kernel(void) rom_add_blob_fixed("params", params_buf, params_size, (16 << 20) - 264); + g_free(params_buf); return entry; } -- cgit v1.2.3-55-g7522