aboutsummaryrefslogtreecommitdiff
path: root/hw/mips/mips_fulong2e.c
diff options
context:
space:
mode:
authorGonglei <arei.gonglei@huawei.com>2015-04-28 17:11:02 +0800
committerMichael Tokarev <mjt@tls.msk.ru>2015-04-30 16:06:17 +0300
commit3ad9fd5a257794d516db515c217c78a5806112fe (patch)
tree4ed714ef0f68bd0e3a76d5c43c0b6b839804bebb /hw/mips/mips_fulong2e.c
parent5403432f39fc09ce1973cc8c1a62e16502358bf7 (diff)
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 <aurelien@aurel32.net> Cc: Leon Alrae <leon.alrae@imgtec.com> Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Leon Alrae <leon.alrae@imgtec.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'hw/mips/mips_fulong2e.c')
-rw-r--r--hw/mips/mips_fulong2e.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c
index 4aae64a9ec..dea941ad88 100644
--- a/hw/mips/mips_fulong2e.c
+++ b/hw/mips/mips_fulong2e.c
@@ -168,6 +168,7 @@ static int64_t load_kernel (CPUMIPSState *env)
rom_add_blob_fixed("prom", prom_buf, prom_size,
cpu_mips_kseg0_to_phys(NULL, ENVP_ADDR));
+ g_free(prom_buf);
return kernel_entry;
}